You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@couchdb.apache.org by Apache Wiki <wi...@apache.org> on 2010/12/20 13:51:41 UTC

[Couchdb Wiki] Update of "Running CouchDB in Dev Mode" by BramNeijt

Dear Wiki user,

You have subscribed to a wiki page or wiki category on "Couchdb Wiki" for change notification.

The "Running CouchDB in Dev Mode" page has been changed by BramNeijt.
The comment on this change is: Add information on getting the erlang debugger running.
http://wiki.apache.org/couchdb/Running%20CouchDB%20in%20Dev%20Mode?action=diff&rev1=7&rev2=8

--------------------------------------------------

  $ LD_RUN_PATH=/usr/lib/xulrunner-1.9.1.7 utils/run
  }}}
  
+ === Run with debugger ===
+ By default, make dev does not add debug information, so loading the debugger will not work. To start the debugger when couchdb starts, add the following debugger:start() line to src/couchdb/couch.erl:
+ {{{
+ start() ->
+     debugger:start(),
+     application:start(couch).
+ }}}
+ Now recompile all sources with ERLC_FLAGS set to enable debug information:
+ {{{
+ make clean
+ xulrunner_gre_version=`xulrunner --gre-version`
+ export ERLC_FLAGS=+debug_info
+ LD_RUN_PATH=/usr/lib/xulrunner-devel-${xulrunner_gre_version}/lib/ ./configure --with-js-lib=/usr/lib/xulrunner-devel-${xulrunner_gre_version}/lib/ --with-js-include=/usr/lib/xulrunner-devel-${xulrunner_gre_version}/include/ && ERLC_FLAGS=+debug_info make dev
+ }}}
+ then use the following command to start a couchdb with local configuration:
+ {{{
+ xulrunner_gre_version=`xulrunner --gre-version`
+ LD_LIBRARY_PATH=/usr/lib/xulrunner-devel-${xulrunner_gre_version}/lib/ ./utils/run
+ }}}
+ the debugger window should appear and using "Module" -> "Interpret..." will allow you to select the source code for modules you want to track. As an example select src/couchdb/couch_db.erl and visit '/_utils/' in the browser to see calls coming in.
+