couchdb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Robert Dionne <>
Subject debugging couchdb with Distel
Date Tue, 11 Nov 2008 12:35:37 GMT
For any couchdb newbies that are distel users, I figured out the  
following tweaks to run couch in the debugger:

Assuming couch is built to run from the sources directory with couch- 

1. run the couchdb script using the -i option, where the script has  
been modified to add a -sname mynodename to the erl command

./bin/couchdb -i -c couch-dev.ini

2. from the erlang shell change to the sources directory:


3. compile modules with debug info as needed:


4. in emacs, rather than starting an erlang shell, attach to the  
running couch:

C-c C-d n   and specify the node name passed into -sname in the  
couchdb script

set breakpoints, load modules, etc... as usual

I find it useful to be able to step through the code and highly  
recommend distel for any emacs users. The M-.  feature alone is worth  
it. Because it attaches to a running erlang node looking up all the  
code sources is free. For more details see 

Bob Dionne

View raw message