You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@couchdb.apache.org by Andrey Somov <tr...@googlemail.com> on 2011/04/28 18:03:14 UTC

Development environment

Hi all,
in order to understand how CouchDB works I want be able to run the
application under debugger. Unfortunately it does not look like an easy
task.
The information provided on the wiiki (
http://wiki.apache.org/couchdb/Running%20CouchDB%20in%20Dev%20Mode) may be
enough for a
professional Erlang developer but it is not enough for anyone who learns
Erlang together with CouchDB.
I could not find any resource which gives step-by-step instructions on how
to organise an effective development environment for CouchDB.

Can someone point me to such a guide/tutorial/manual/screencast ?

Thanks,
Andrey

Re: Development environment

Posted by Jan Lehnardt <ja...@apache.org>.
On 29 Apr 2011, at 06:36, Andrey Somov wrote:
> P.S. I have already identified some redundant code (
> https://issues.apache.org/jira/browse/COUCHDB-920).
> I hope I can further improve the code base when I am able to debug the
> running database.

Thank you for your efforts Andrey and thanks for calling out an obvious
deficiency in our setup for the way you work. I'm looking forward to your
contributions :)

I strongly believe, and you have already proven, that a new perspective
on code brings previously unknown issues to light. This is going to be
good :)

Cheers
Jan
-- 


> 
> 
> 
> On Fri, Apr 29, 2011 at 1:34 PM, Robert Dionne <dionne@dionne-associates.com
>> wrote:
> 
>> Hi Andrey,
>> 
>> I use Distel[1] (Distributed emacs lisp for Erlang), a set of emacs
>> extensions that create a full development environment for Erlang. It
>> connects to a running node so one gets full access to the syntax_tools and
>> source code of Erlang, all at run time. As this brief white paper points out
>> it goes further than typical elisp hacks as it imports the Erlang
>> distributed model into emacs. I keep hoping to find some time to push it a
>> little further and provide better support for working with BigCouch, our
>> clustered CouchDB at Cloudant.
>> 
>> I keep up my own fork of it as there aren't too many of us out there and I
>> needed to fix a few things. I also include in that project some tweaks to
>> the Erlang mode that ships with Erlang to accommodate the CouchDB format
>> conventions. It provides a full symbolic debugging environment. Though it's
>> useful and I think I've found a few CouchDB bugs with it, given the nature
>> of OTP programming it's a little harder when you have breakpoints that hit
>> 50 processes. It was great for stepping thru the btree code.
>> 
>> The most useful features are the navigation (M-. M-,) and who_calls (C-c
>> C-d w) The lack of use of who_calls I believe is the major reason we often
>> discover dead code that's been there forever. As an aside the use of type
>> specs and dialyzer go a long way towards finding errors at compile time.
>> 
>> Regards,
>> 
>> Bob
>> 
>> [1] https://github.com/bdionne/distel/raw/master/doc/gorrie02distel.pdf
>> [2] https://github.com/bdionne/distel
>> 
>> 
>> 
>> 


Re: Development environment

Posted by Andrey Somov <tr...@googlemail.com>.
Hello Robert,
this is much closer to what I expect.
I assume I should follow the procedure described here
http://mail-archives.apache.org/mod_mbox/couchdb-dev/200811.mbox/%3CC397E43F-096F-4892-9519-383032622FCD@dionne-associates.com%3E

I will give it a try.
Thank you very much.
-
Andrey

P.S. I have already identified some redundant code (
https://issues.apache.org/jira/browse/COUCHDB-920).
I hope I can further improve the code base when I am able to debug the
running database.



On Fri, Apr 29, 2011 at 1:34 PM, Robert Dionne <dionne@dionne-associates.com
> wrote:

> Hi Andrey,
>
>  I use Distel[1] (Distributed emacs lisp for Erlang), a set of emacs
> extensions that create a full development environment for Erlang. It
> connects to a running node so one gets full access to the syntax_tools and
> source code of Erlang, all at run time. As this brief white paper points out
> it goes further than typical elisp hacks as it imports the Erlang
> distributed model into emacs. I keep hoping to find some time to push it a
> little further and provide better support for working with BigCouch, our
> clustered CouchDB at Cloudant.
>
>  I keep up my own fork of it as there aren't too many of us out there and I
> needed to fix a few things. I also include in that project some tweaks to
> the Erlang mode that ships with Erlang to accommodate the CouchDB format
> conventions. It provides a full symbolic debugging environment. Though it's
> useful and I think I've found a few CouchDB bugs with it, given the nature
> of OTP programming it's a little harder when you have breakpoints that hit
> 50 processes. It was great for stepping thru the btree code.
>
>  The most useful features are the navigation (M-. M-,) and who_calls (C-c
> C-d w) The lack of use of who_calls I believe is the major reason we often
> discover dead code that's been there forever. As an aside the use of type
> specs and dialyzer go a long way towards finding errors at compile time.
>
> Regards,
>
> Bob
>
> [1] https://github.com/bdionne/distel/raw/master/doc/gorrie02distel.pdf
> [2] https://github.com/bdionne/distel
>
>
>
>

Re: Development environment

Posted by Andrey Somov <tr...@googlemail.com>.
Hi Robert,
unfortunately, I could not build distel (on Ubuntu 10.04):

trop:~/distel-bdionne$ erl
Erlang R13B03 (erts-5.7.4) [source] [rq:1] [async-threads:0] [hipe]
[kernel-poll:false]

Eshell V5.7.4  (abort with ^G)
1>

trop:~/distel-bdionne$ make --debug
GNU Make 3.81
Copyright (C) 2006  Free Software Foundation, Inc.
This is free software; see the source for copying conditions.
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE.

This program built for i486-pc-linux-gnu
Reading makefiles...
Updating goal targets....
 File `base' does not exist.
   File `ebin/distel.beam' does not exist.
  Must remake target `ebin/distel.beam'.
erlc -W -o ebin +debug_info src/distel.erl
/home/trop/distel-bdionne/ebin/distel.bea#: error writing file
make: *** [ebin/distel.beam] Error 1

Re: Development environment

Posted by Robert Dionne <di...@dionne-associates.com>.
Hi Andrey,

  I use Distel[1] (Distributed emacs lisp for Erlang), a set of emacs extensions that create a full development environment for Erlang. It connects to a running node so one gets full access to the syntax_tools and source code of Erlang, all at run time. As this brief white paper points out it goes further than typical elisp hacks as it imports the Erlang distributed model into emacs. I keep hoping to find some time to push it a little further and provide better support for working with BigCouch, our clustered CouchDB at Cloudant.

  I keep up my own fork of it as there aren't too many of us out there and I needed to fix a few things. I also include in that project some tweaks to the Erlang mode that ships with Erlang to accommodate the CouchDB format conventions. It provides a full symbolic debugging environment. Though it's useful and I think I've found a few CouchDB bugs with it, given the nature of OTP programming it's a little harder when you have breakpoints that hit 50 processes. It was great for stepping thru the btree code.

  The most useful features are the navigation (M-. M-,) and who_calls (C-c C-d w) The lack of use of who_calls I believe is the major reason we often discover dead code that's been there forever. As an aside the use of type specs and dialyzer go a long way towards finding errors at compile time.

Regards,

Bob

[1] https://github.com/bdionne/distel/raw/master/doc/gorrie02distel.pdf
[2] https://github.com/bdionne/distel

On Apr 28, 2011, at 9:03 AM, Andrey Somov wrote:

> Hi all,
> in order to understand how CouchDB works I want be able to run the
> application under debugger. Unfortunately it does not look like an easy
> task.
> The information provided on the wiiki (
> http://wiki.apache.org/couchdb/Running%20CouchDB%20in%20Dev%20Mode) may be
> enough for a
> professional Erlang developer but it is not enough for anyone who learns
> Erlang together with CouchDB.
> I could not find any resource which gives step-by-step instructions on how
> to organise an effective development environment for CouchDB.
> 
> Can someone point me to such a guide/tutorial/manual/screencast ?
> 
> Thanks,
> Andrey


Re: Development environment

Posted by Jan Lehnardt <ja...@apache.org>.
On 28 Apr 2011, at 19:17, Nathan Stott wrote:

> Originally, (until 0.11 I think?) CouchDB was developed without unit
> tests.

That is not correct. The source has always contained testing code for
the harder parts of CouchDB. They just weren't always accessible to
the user, but only to developers.

>  I take it from this thread it was also developed then without
> step-by-step debugging.  It's amazing how stable it is and has been in
> light of those two facts.

What Noah said, there are many more ways to develop software :)

Cheers
Jan
-- 




> On Thu, Apr 28, 2011 at 7:40 PM, till <ti...@php.net> wrote:
>> On Fri, Apr 29, 2011 at 2:38 AM, Miles Fidelman
>> <mf...@meetinghouse.net> wrote:
>>> Andrey Somov wrote:
>>>> 
>>>> On Fri, Apr 29, 2011 at 1:01 AM, Paul
>>>> Davis<pa...@gmail.com>wrote:
>>>> 
>>>> 
>>>>> 
>>>>> On Thu, Apr 28, 2011 at 6:57 PM, Nathan Stott<nr...@gmail.com>  wrote:
>>>>> 
>>>>>> 
>>>>>> So couchdb is really developed without using step-by-step debugging at
>>>>>> all?  That seems quite odd.
>>>>>> 
>>>>>> 
>>>>> 
>>>>> I never use step by step debugging on any project in any language.
>>>>> I've never found it that useful.
>>>>> 
>>>>> 
>>>> 
>>>> step by step debugging of a unit test is one the most effective ways to
>>>> find
>>>> bugs.
>>>> 
>>>> 
>>> 
>>> Until you start running highly concurrent software, distributed across
>>> multiple nodes.  That takes debugging to a whole new level.
>>> 
>> 
>> A unit test doesn't run on multiple nodes.
>> 


Re: Development environment

Posted by Noah Slater <ns...@apache.org>.
On 29 Apr 2011, at 03:17, Nathan Stott wrote:

> Originally, (until 0.11 I think?) CouchDB was developed without unit
> tests.  I take it from this thread it was also developed then without
> step-by-step debugging.  It's amazing how stable it is and has been in
> light of those two facts.

Depends how you're writing code, I think.

Some people, me included, and especially in web development, tend to adopt the Throw Enough Shit, See What Sticks approach to software. Engineers and computer scientists tend to take the opposite approach. Knuth famously remarked "Beware of bugs in the above code; I have only proved it correct, not tried it." Any point on that spectrum is a trade-off, and some approaches are more suited to certain applications. I am guessing that database development is more up towards the Knuth end. Maybe that's how Damian codes?

I doubt Knuth has any use for unit tests.


Re: Development environment

Posted by Nathan Stott <nr...@gmail.com>.
Originally, (until 0.11 I think?) CouchDB was developed without unit
tests.  I take it from this thread it was also developed then without
step-by-step debugging.  It's amazing how stable it is and has been in
light of those two facts.

On Thu, Apr 28, 2011 at 7:40 PM, till <ti...@php.net> wrote:
> On Fri, Apr 29, 2011 at 2:38 AM, Miles Fidelman
> <mf...@meetinghouse.net> wrote:
>> Andrey Somov wrote:
>>>
>>> On Fri, Apr 29, 2011 at 1:01 AM, Paul
>>> Davis<pa...@gmail.com>wrote:
>>>
>>>
>>>>
>>>> On Thu, Apr 28, 2011 at 6:57 PM, Nathan Stott<nr...@gmail.com>  wrote:
>>>>
>>>>>
>>>>> So couchdb is really developed without using step-by-step debugging at
>>>>> all?  That seems quite odd.
>>>>>
>>>>>
>>>>
>>>> I never use step by step debugging on any project in any language.
>>>> I've never found it that useful.
>>>>
>>>>
>>>
>>> step by step debugging of a unit test is one the most effective ways to
>>> find
>>> bugs.
>>>
>>>
>>
>> Until you start running highly concurrent software, distributed across
>> multiple nodes.  That takes debugging to a whole new level.
>>
>
> A unit test doesn't run on multiple nodes.
>

Re: Development environment

Posted by till <ti...@php.net>.
On Fri, Apr 29, 2011 at 2:38 AM, Miles Fidelman
<mf...@meetinghouse.net> wrote:
> Andrey Somov wrote:
>>
>> On Fri, Apr 29, 2011 at 1:01 AM, Paul
>> Davis<pa...@gmail.com>wrote:
>>
>>
>>>
>>> On Thu, Apr 28, 2011 at 6:57 PM, Nathan Stott<nr...@gmail.com>  wrote:
>>>
>>>>
>>>> So couchdb is really developed without using step-by-step debugging at
>>>> all?  That seems quite odd.
>>>>
>>>>
>>>
>>> I never use step by step debugging on any project in any language.
>>> I've never found it that useful.
>>>
>>>
>>
>> step by step debugging of a unit test is one the most effective ways to
>> find
>> bugs.
>>
>>
>
> Until you start running highly concurrent software, distributed across
> multiple nodes.  That takes debugging to a whole new level.
>

A unit test doesn't run on multiple nodes.

Re: Development environment

Posted by Miles Fidelman <mf...@meetinghouse.net>.
Andrey Somov wrote:
> On Fri, Apr 29, 2011 at 1:01 AM, Paul Davis<pa...@gmail.com>wrote:
>
>    
>> On Thu, Apr 28, 2011 at 6:57 PM, Nathan Stott<nr...@gmail.com>  wrote:
>>      
>>> So couchdb is really developed without using step-by-step debugging at
>>> all?  That seems quite odd.
>>>
>>>        
>> I never use step by step debugging on any project in any language.
>> I've never found it that useful.
>>
>>      
> step by step debugging of a unit test is one the most effective ways to find
> bugs.
>
>    
Until you start running highly concurrent software, distributed across 
multiple nodes.  That takes debugging to a whole new level.




-- 
In theory, there is no difference between theory and practice.
In<fnord>  practice, there is.   .... Yogi Berra



Re: Development environment

Posted by Paul Davis <pa...@gmail.com>.
On Thu, Apr 28, 2011 at 8:21 PM, Andrey Somov <tr...@googlemail.com> wrote:
> On Fri, Apr 29, 2011 at 1:01 AM, Paul Davis <pa...@gmail.com>wrote:
>
>> On Thu, Apr 28, 2011 at 6:57 PM, Nathan Stott <nr...@gmail.com> wrote:
>> > So couchdb is really developed without using step-by-step debugging at
>> > all?  That seems quite odd.
>> >
>>
>> I never use step by step debugging on any project in any language.
>> I've never found it that useful.
>>
>
> step by step debugging of a unit test is one the most effective ways to find
> bugs.
>
> -
> Andrey
>

I prefer the Feynman approach.

Re: Development environment

Posted by Andrey Somov <tr...@googlemail.com>.
On Fri, Apr 29, 2011 at 1:01 AM, Paul Davis <pa...@gmail.com>wrote:

> On Thu, Apr 28, 2011 at 6:57 PM, Nathan Stott <nr...@gmail.com> wrote:
> > So couchdb is really developed without using step-by-step debugging at
> > all?  That seems quite odd.
> >
>
> I never use step by step debugging on any project in any language.
> I've never found it that useful.
>

step by step debugging of a unit test is one the most effective ways to find
bugs.

-
Andrey

Re: Development environment

Posted by Paul Davis <pa...@gmail.com>.
On Thu, Apr 28, 2011 at 6:57 PM, Nathan Stott <nr...@gmail.com> wrote:
> So couchdb is really developed without using step-by-step debugging at
> all?  That seems quite odd.
>

I never use step by step debugging on any project in any language.
I've never found it that useful.

Re: Development environment

Posted by Randall Leeds <ra...@gmail.com>.
On Thu, Apr 28, 2011 at 15:57, Nathan Stott <nr...@gmail.com> wrote:
> So couchdb is really developed without using step-by-step debugging at
> all?  That seems quite odd.
>

Most of the time, when I've written couchdb patches and they're wrong
I immediately get dying processes, stack traces and errors. The number
of silent, strange problems I produce is just smaller in Erlang than
other languages.

I think it's a combination of pattern matching, immutable variables
and referential transparency.

> On Thu, Apr 28, 2011 at 5:52 PM, Paul Davis <pa...@gmail.com> wrote:
>> On Thu, Apr 28, 2011 at 6:45 PM, Andrey Somov <tr...@googlemail.com> wrote:
>>> On Thu, Apr 28, 2011 at 7:43 PM, Miles Fidelman
>>> <mf...@meetinghouse.net>wrote:
>>>
>>>> I'm not 100% sure, but I expect Erlide might fill the bill - it's an Erlang
>>>> IDE that runs under Eclipse.  Now how much further that takes you into the
>>>> guts of CouchDB is another story.
>>>>
>>>>
>>> I tried to use erlIDE but I did not find a way to launch CouchDB.
>>> Googling did not help and asking the question in this mailing list did not
>>> help either.
>>> As far as I understand no CouchDB developer is using erlIDE at the moment.
>>>
>>> It looks like I have to keep using io:format.
>>>
>>> -
>>> Andrey
>>>
>>
>> The only person I know doing debugger things is a big emacs guy. If
>> you're into that sort of thing Erlang supposedly has good integration
>> there.
>>
>

Re: Development environment

Posted by Andrew Tunnell-Jones <an...@tj.id.au>.
Tracing seems more common in Erlang. Have you looked at the debugger or redbug?

On 28/04/2011, at 10:57 PM, Nathan Stott wrote:

> So couchdb is really developed without using step-by-step debugging at
> all?  That seems quite odd.
> 
> On Thu, Apr 28, 2011 at 5:52 PM, Paul Davis <pa...@gmail.com> wrote:
>> On Thu, Apr 28, 2011 at 6:45 PM, Andrey Somov <tr...@googlemail.com> wrote:
>>> On Thu, Apr 28, 2011 at 7:43 PM, Miles Fidelman
>>> <mf...@meetinghouse.net>wrote:
>>> 
>>>> I'm not 100% sure, but I expect Erlide might fill the bill - it's an Erlang
>>>> IDE that runs under Eclipse.  Now how much further that takes you into the
>>>> guts of CouchDB is another story.
>>>> 
>>>> 
>>> I tried to use erlIDE but I did not find a way to launch CouchDB.
>>> Googling did not help and asking the question in this mailing list did not
>>> help either.
>>> As far as I understand no CouchDB developer is using erlIDE at the moment.
>>> 
>>> It looks like I have to keep using io:format.
>>> 
>>> -
>>> Andrey
>>> 
>> 
>> The only person I know doing debugger things is a big emacs guy. If
>> you're into that sort of thing Erlang supposedly has good integration
>> there.
>> 


Re: Development environment

Posted by Nathan Stott <nr...@gmail.com>.
So couchdb is really developed without using step-by-step debugging at
all?  That seems quite odd.

On Thu, Apr 28, 2011 at 5:52 PM, Paul Davis <pa...@gmail.com> wrote:
> On Thu, Apr 28, 2011 at 6:45 PM, Andrey Somov <tr...@googlemail.com> wrote:
>> On Thu, Apr 28, 2011 at 7:43 PM, Miles Fidelman
>> <mf...@meetinghouse.net>wrote:
>>
>>> I'm not 100% sure, but I expect Erlide might fill the bill - it's an Erlang
>>> IDE that runs under Eclipse.  Now how much further that takes you into the
>>> guts of CouchDB is another story.
>>>
>>>
>> I tried to use erlIDE but I did not find a way to launch CouchDB.
>> Googling did not help and asking the question in this mailing list did not
>> help either.
>> As far as I understand no CouchDB developer is using erlIDE at the moment.
>>
>> It looks like I have to keep using io:format.
>>
>> -
>> Andrey
>>
>
> The only person I know doing debugger things is a big emacs guy. If
> you're into that sort of thing Erlang supposedly has good integration
> there.
>

Re: Development environment

Posted by Paul Davis <pa...@gmail.com>.
On Thu, Apr 28, 2011 at 6:45 PM, Andrey Somov <tr...@googlemail.com> wrote:
> On Thu, Apr 28, 2011 at 7:43 PM, Miles Fidelman
> <mf...@meetinghouse.net>wrote:
>
>> I'm not 100% sure, but I expect Erlide might fill the bill - it's an Erlang
>> IDE that runs under Eclipse.  Now how much further that takes you into the
>> guts of CouchDB is another story.
>>
>>
> I tried to use erlIDE but I did not find a way to launch CouchDB.
> Googling did not help and asking the question in this mailing list did not
> help either.
> As far as I understand no CouchDB developer is using erlIDE at the moment.
>
> It looks like I have to keep using io:format.
>
> -
> Andrey
>

The only person I know doing debugger things is a big emacs guy. If
you're into that sort of thing Erlang supposedly has good integration
there.

Re: Development environment

Posted by Andrey Somov <tr...@googlemail.com>.
On Thu, Apr 28, 2011 at 7:43 PM, Miles Fidelman
<mf...@meetinghouse.net>wrote:

> I'm not 100% sure, but I expect Erlide might fill the bill - it's an Erlang
> IDE that runs under Eclipse.  Now how much further that takes you into the
> guts of CouchDB is another story.
>
>
I tried to use erlIDE but I did not find a way to launch CouchDB.
Googling did not help and asking the question in this mailing list did not
help either.
As far as I understand no CouchDB developer is using erlIDE at the moment.

It looks like I have to keep using io:format.

-
Andrey

Re: Development environment

Posted by Randall Leeds <ra...@gmail.com>.
The simplest thing is just:

make dev
./utils/run -i

This will launch couch and drop you into an interacting erlang session.
>From there you can use erlang calls to inspect processes, enable tracing, etc.

As far as an interactive step debugger I don't know. Never tried.

On Thu, Apr 28, 2011 at 10:43, Miles Fidelman
<mf...@meetinghouse.net> wrote:
> I'm not 100% sure, but I expect Erlide might fill the bill - it's an Erlang
> IDE that runs under Eclipse.  Now how much further that takes you into the
> guts of CouchDB is another story.
>
> Andrey Somov wrote:
>>
>> Thank you, but the question is not how to run but how to DEBUG (and watch
>> all the values, function calls etc)
>> Just the ability to run CouchDB does not help to understand who is calling
>> whom, when, how, with which arguments...
>>
>> -
>> Andrey
>>
>> On Thu, Apr 28, 2011 at 6:10 PM, Paul
>> Davis<pa...@gmail.com>wrote:
>>
>>
>>>
>>> On Thu, Apr 28, 2011 at 12:03 PM, Andrey Somov
>>> <tr...@googlemail.com>  wrote:
>>>
>>>>
>>>> Hi all,
>>>> in order to understand how CouchDB works I want be able to run the
>>>> application under debugger. Unfortunately it does not look like an easy
>>>> task.
>>>> The information provided on the wiiki (
>>>> http://wiki.apache.org/couchdb/Running%20CouchDB%20in%20Dev%20Mode) may
>>>>
>>>
>>> be
>>>
>>>>
>>>> enough for a
>>>> professional Erlang developer but it is not enough for anyone who learns
>>>> Erlang together with CouchDB.
>>>> I could not find any resource which gives step-by-step instructions on
>>>>
>>>
>>> how
>>>
>>>>
>>>> to organise an effective development environment for CouchDB.
>>>>
>>>> Can someone point me to such a guide/tutorial/manual/screencast ?
>>>>
>>>> Thanks,
>>>> Andrey
>>>>
>>>>
>>>
>>> Getting deps on Ubuntu (maybe debian?)
>>>
>>> $ sudo apt-get build-deps couchdb
>>>
>>> On OS X with Homebrew you should only need to do something like:
>>>
>>> $ brew install erlang
>>> $ brew install spidermonkey
>>> $ brew install icu4c&&  brew link icu4c
>>>
>>> Then for CouchDB:
>>>
>>> $ mkdir -p ~/code&&  cd code
>>> $ svn checkout http://svn.apache.org/repos/asf/couchdb/trunk couchdb
>>> $ # alternatively: git clone git://git.apache.org/couchdb.git
>>> $ cd couchdb
>>> $ ./bootstrap&&  ./configure&&  make dev
>>> $ ./utils/run
>>>
>>>
>>
>>
>
>
> --
> In theory, there is no difference between theory and practice.
> In<fnord>  practice, there is.   .... Yogi Berra
>
>
>

Re: Development environment

Posted by Miles Fidelman <mf...@meetinghouse.net>.
I'm not 100% sure, but I expect Erlide might fill the bill - it's an 
Erlang IDE that runs under Eclipse.  Now how much further that takes you 
into the guts of CouchDB is another story.

Andrey Somov wrote:
> Thank you, but the question is not how to run but how to DEBUG (and watch
> all the values, function calls etc)
> Just the ability to run CouchDB does not help to understand who is calling
> whom, when, how, with which arguments...
>
> -
> Andrey
>
> On Thu, Apr 28, 2011 at 6:10 PM, Paul Davis<pa...@gmail.com>wrote:
>
>    
>> On Thu, Apr 28, 2011 at 12:03 PM, Andrey Somov
>> <tr...@googlemail.com>  wrote:
>>      
>>> Hi all,
>>> in order to understand how CouchDB works I want be able to run the
>>> application under debugger. Unfortunately it does not look like an easy
>>> task.
>>> The information provided on the wiiki (
>>> http://wiki.apache.org/couchdb/Running%20CouchDB%20in%20Dev%20Mode) may
>>>        
>> be
>>      
>>> enough for a
>>> professional Erlang developer but it is not enough for anyone who learns
>>> Erlang together with CouchDB.
>>> I could not find any resource which gives step-by-step instructions on
>>>        
>> how
>>      
>>> to organise an effective development environment for CouchDB.
>>>
>>> Can someone point me to such a guide/tutorial/manual/screencast ?
>>>
>>> Thanks,
>>> Andrey
>>>
>>>        
>> Getting deps on Ubuntu (maybe debian?)
>>
>> $ sudo apt-get build-deps couchdb
>>
>> On OS X with Homebrew you should only need to do something like:
>>
>> $ brew install erlang
>> $ brew install spidermonkey
>> $ brew install icu4c&&  brew link icu4c
>>
>> Then for CouchDB:
>>
>> $ mkdir -p ~/code&&  cd code
>> $ svn checkout http://svn.apache.org/repos/asf/couchdb/trunk couchdb
>> $ # alternatively: git clone git://git.apache.org/couchdb.git
>> $ cd couchdb
>> $ ./bootstrap&&  ./configure&&  make dev
>> $ ./utils/run
>>
>>      
>    


-- 
In theory, there is no difference between theory and practice.
In<fnord>  practice, there is.   .... Yogi Berra



Re: Development environment

Posted by Paul Davis <pa...@gmail.com>.
On Thu, Apr 28, 2011 at 3:19 PM, Benoit Chesneau <bc...@gmail.com> wrote:
> On Thursday, April 28, 2011, Paul Davis <pa...@gmail.com> wrote:
>> On Thu, Apr 28, 2011 at 12:15 PM, Andrey Somov
>> <tr...@googlemail.com> wrote:
>>> Thank you, but the question is not how to run but how to DEBUG (and watch
>>> all the values, function calls etc)
>>> Just the ability to run CouchDB does not help to understand who is calling
>>> whom, when, how, with which arguments...
>>>
>>
>> Oh, gotchya. Yeah, I know Bob Dionne does some stuff with emacs and
>> distel or something or other. I'm one of those weirdos that just uses
>> a lot of ?LOG_DEBUG/?LOG_INFO calls when I need to investigate
>> something.
>>
>
> or io:format ?

And Rob Newson mentioned erlang:display(Term) as well.

>>> -
>>> Andrey
>>>
>>> On Thu, Apr 28, 2011 at 6:10 PM, Paul Davis <pa...@gmail.com>wrote:
>>>
>>>> On Thu, Apr 28, 2011 at 12:03 PM, Andrey Somov
>>>> <tr...@googlemail.com> wrote:
>>>> > Hi all,
>>>> > in order to understand how CouchDB works I want be able to run the
>>>> > application under debugger. Unfortunately it does not look like an easy
>>>> > task.
>>>> > The information provided on the wiiki (
>>>> > http://wiki.apache.org/couchdb/Running%20CouchDB%20in%20Dev%20Mode) may
>>>> be
>>>> > enough for a
>>>> > professional Erlang developer but it is not enough for anyone who learns
>>>> > Erlang together with CouchDB.
>>>> > I could not find any resource which gives step-by-step instructions on
>>>> how
>>>> > to organise an effective development environment for CouchDB.
>>>> >
>>>> > Can someone point me to such a guide/tutorial/manual/screencast ?
>>>> >
>>>> > Thanks,
>>>> > Andrey
>>>> >
>>>>
>>>> Getting deps on Ubuntu (maybe debian?)
>>>>
>>>> $ sudo apt-get build-deps couchdb
>>>>
>>>> On OS X with Homebrew you should only need to do something like:
>>>>
>>>> $ brew install erlang
>>>> $ brew install spidermonkey
>>>> $ brew install icu4c && brew link icu4c
>>>>
>>>> Then for CouchDB:
>>>>
>>>> $ mkdir -p ~/code && cd code
>>>> $ svn checkout http://svn.apache.org/repos/asf/couchdb/trunk couchdb
>>>> $ # alternatively: git clone git://git.apache.org/couchdb.git
>>>> $ cd couchdb
>>>> $ ./bootstrap && ./configure && make dev
>>>> $ ./utils/run
>>>>
>>>
>>
>

Re: Development environment

Posted by Benoit Chesneau <bc...@gmail.com>.
On Thursday, April 28, 2011, Paul Davis <pa...@gmail.com> wrote:
> On Thu, Apr 28, 2011 at 12:15 PM, Andrey Somov
> <tr...@googlemail.com> wrote:
>> Thank you, but the question is not how to run but how to DEBUG (and watch
>> all the values, function calls etc)
>> Just the ability to run CouchDB does not help to understand who is calling
>> whom, when, how, with which arguments...
>>
>
> Oh, gotchya. Yeah, I know Bob Dionne does some stuff with emacs and
> distel or something or other. I'm one of those weirdos that just uses
> a lot of ?LOG_DEBUG/?LOG_INFO calls when I need to investigate
> something.
>

or io:format ?
>> -
>> Andrey
>>
>> On Thu, Apr 28, 2011 at 6:10 PM, Paul Davis <pa...@gmail.com>wrote:
>>
>>> On Thu, Apr 28, 2011 at 12:03 PM, Andrey Somov
>>> <tr...@googlemail.com> wrote:
>>> > Hi all,
>>> > in order to understand how CouchDB works I want be able to run the
>>> > application under debugger. Unfortunately it does not look like an easy
>>> > task.
>>> > The information provided on the wiiki (
>>> > http://wiki.apache.org/couchdb/Running%20CouchDB%20in%20Dev%20Mode) may
>>> be
>>> > enough for a
>>> > professional Erlang developer but it is not enough for anyone who learns
>>> > Erlang together with CouchDB.
>>> > I could not find any resource which gives step-by-step instructions on
>>> how
>>> > to organise an effective development environment for CouchDB.
>>> >
>>> > Can someone point me to such a guide/tutorial/manual/screencast ?
>>> >
>>> > Thanks,
>>> > Andrey
>>> >
>>>
>>> Getting deps on Ubuntu (maybe debian?)
>>>
>>> $ sudo apt-get build-deps couchdb
>>>
>>> On OS X with Homebrew you should only need to do something like:
>>>
>>> $ brew install erlang
>>> $ brew install spidermonkey
>>> $ brew install icu4c && brew link icu4c
>>>
>>> Then for CouchDB:
>>>
>>> $ mkdir -p ~/code && cd code
>>> $ svn checkout http://svn.apache.org/repos/asf/couchdb/trunk couchdb
>>> $ # alternatively: git clone git://git.apache.org/couchdb.git
>>> $ cd couchdb
>>> $ ./bootstrap && ./configure && make dev
>>> $ ./utils/run
>>>
>>
>

Re: Development environment

Posted by Paul Davis <pa...@gmail.com>.
On Thu, Apr 28, 2011 at 12:15 PM, Andrey Somov
<tr...@googlemail.com> wrote:
> Thank you, but the question is not how to run but how to DEBUG (and watch
> all the values, function calls etc)
> Just the ability to run CouchDB does not help to understand who is calling
> whom, when, how, with which arguments...
>

Oh, gotchya. Yeah, I know Bob Dionne does some stuff with emacs and
distel or something or other. I'm one of those weirdos that just uses
a lot of ?LOG_DEBUG/?LOG_INFO calls when I need to investigate
something.

> -
> Andrey
>
> On Thu, Apr 28, 2011 at 6:10 PM, Paul Davis <pa...@gmail.com>wrote:
>
>> On Thu, Apr 28, 2011 at 12:03 PM, Andrey Somov
>> <tr...@googlemail.com> wrote:
>> > Hi all,
>> > in order to understand how CouchDB works I want be able to run the
>> > application under debugger. Unfortunately it does not look like an easy
>> > task.
>> > The information provided on the wiiki (
>> > http://wiki.apache.org/couchdb/Running%20CouchDB%20in%20Dev%20Mode) may
>> be
>> > enough for a
>> > professional Erlang developer but it is not enough for anyone who learns
>> > Erlang together with CouchDB.
>> > I could not find any resource which gives step-by-step instructions on
>> how
>> > to organise an effective development environment for CouchDB.
>> >
>> > Can someone point me to such a guide/tutorial/manual/screencast ?
>> >
>> > Thanks,
>> > Andrey
>> >
>>
>> Getting deps on Ubuntu (maybe debian?)
>>
>> $ sudo apt-get build-deps couchdb
>>
>> On OS X with Homebrew you should only need to do something like:
>>
>> $ brew install erlang
>> $ brew install spidermonkey
>> $ brew install icu4c && brew link icu4c
>>
>> Then for CouchDB:
>>
>> $ mkdir -p ~/code && cd code
>> $ svn checkout http://svn.apache.org/repos/asf/couchdb/trunk couchdb
>> $ # alternatively: git clone git://git.apache.org/couchdb.git
>> $ cd couchdb
>> $ ./bootstrap && ./configure && make dev
>> $ ./utils/run
>>
>

Re: Development environment

Posted by Andrey Somov <tr...@googlemail.com>.
Thank you, but the question is not how to run but how to DEBUG (and watch
all the values, function calls etc)
Just the ability to run CouchDB does not help to understand who is calling
whom, when, how, with which arguments...

-
Andrey

On Thu, Apr 28, 2011 at 6:10 PM, Paul Davis <pa...@gmail.com>wrote:

> On Thu, Apr 28, 2011 at 12:03 PM, Andrey Somov
> <tr...@googlemail.com> wrote:
> > Hi all,
> > in order to understand how CouchDB works I want be able to run the
> > application under debugger. Unfortunately it does not look like an easy
> > task.
> > The information provided on the wiiki (
> > http://wiki.apache.org/couchdb/Running%20CouchDB%20in%20Dev%20Mode) may
> be
> > enough for a
> > professional Erlang developer but it is not enough for anyone who learns
> > Erlang together with CouchDB.
> > I could not find any resource which gives step-by-step instructions on
> how
> > to organise an effective development environment for CouchDB.
> >
> > Can someone point me to such a guide/tutorial/manual/screencast ?
> >
> > Thanks,
> > Andrey
> >
>
> Getting deps on Ubuntu (maybe debian?)
>
> $ sudo apt-get build-deps couchdb
>
> On OS X with Homebrew you should only need to do something like:
>
> $ brew install erlang
> $ brew install spidermonkey
> $ brew install icu4c && brew link icu4c
>
> Then for CouchDB:
>
> $ mkdir -p ~/code && cd code
> $ svn checkout http://svn.apache.org/repos/asf/couchdb/trunk couchdb
> $ # alternatively: git clone git://git.apache.org/couchdb.git
> $ cd couchdb
> $ ./bootstrap && ./configure && make dev
> $ ./utils/run
>

Re: Development environment

Posted by Paul Davis <pa...@gmail.com>.
On Thu, Apr 28, 2011 at 12:03 PM, Andrey Somov
<tr...@googlemail.com> wrote:
> Hi all,
> in order to understand how CouchDB works I want be able to run the
> application under debugger. Unfortunately it does not look like an easy
> task.
> The information provided on the wiiki (
> http://wiki.apache.org/couchdb/Running%20CouchDB%20in%20Dev%20Mode) may be
> enough for a
> professional Erlang developer but it is not enough for anyone who learns
> Erlang together with CouchDB.
> I could not find any resource which gives step-by-step instructions on how
> to organise an effective development environment for CouchDB.
>
> Can someone point me to such a guide/tutorial/manual/screencast ?
>
> Thanks,
> Andrey
>

Getting deps on Ubuntu (maybe debian?)

$ sudo apt-get build-deps couchdb

On OS X with Homebrew you should only need to do something like:

$ brew install erlang
$ brew install spidermonkey
$ brew install icu4c && brew link icu4c

Then for CouchDB:

$ mkdir -p ~/code && cd code
$ svn checkout http://svn.apache.org/repos/asf/couchdb/trunk couchdb
$ # alternatively: git clone git://git.apache.org/couchdb.git
$ cd couchdb
$ ./bootstrap && ./configure && make dev
$ ./utils/run