Return-Path: Delivered-To: apmail-couchdb-commits-archive@www.apache.org Received: (qmail 54884 invoked from network); 20 Dec 2010 12:52:06 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 20 Dec 2010 12:52:06 -0000 Received: (qmail 85665 invoked by uid 500); 20 Dec 2010 12:52:06 -0000 Delivered-To: apmail-couchdb-commits-archive@couchdb.apache.org Received: (qmail 85553 invoked by uid 500); 20 Dec 2010 12:52:06 -0000 Mailing-List: contact commits-help@couchdb.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@couchdb.apache.org Delivered-To: mailing list commits@couchdb.apache.org Received: (qmail 85546 invoked by uid 500); 20 Dec 2010 12:52:05 -0000 Delivered-To: apmail-incubator-couchdb-commits@incubator.apache.org Received: (qmail 85543 invoked by uid 99); 20 Dec 2010 12:52:05 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 20 Dec 2010 12:52:05 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.131] (HELO eos.apache.org) (140.211.11.131) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 20 Dec 2010 12:52:03 +0000 Received: from eosnew.apache.org (localhost [127.0.0.1]) by eos.apache.org (Postfix) with ESMTP id 902B85F4; Mon, 20 Dec 2010 12:51:41 +0000 (UTC) MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable From: Apache Wiki To: Apache Wiki Date: Mon, 20 Dec 2010 12:51:41 -0000 Message-ID: <20101220125141.53802.50508@eosnew.apache.org> Subject: =?utf-8?q?=5BCouchdb_Wiki=5D_Update_of_=22Running_CouchDB_in_Dev_Mode=22_?= =?utf-8?q?by_BramNeijt?= X-Virus-Checked: Checked by ClamAV on apache.org Dear Wiki user, You have subscribed to a wiki page or wiki category on "Couchdb Wiki" for c= hange 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 debugg= er running. http://wiki.apache.org/couchdb/Running%20CouchDB%20in%20Dev%20Mode?action= =3Ddiff&rev1=3D7&rev2=3D8 -------------------------------------------------- $ LD_RUN_PATH=3D/usr/lib/xulrunner-1.9.1.7 utils/run }}} = + =3D=3D=3D Run with debugger =3D=3D=3D + By default, make dev does not add debug information, so loading the debug= ger will not work. To start the debugger when couchdb starts, add the follo= wing 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=3D`xulrunner --gre-version` + export ERLC_FLAGS=3D+debug_info + LD_RUN_PATH=3D/usr/lib/xulrunner-devel-${xulrunner_gre_version}/lib/ ./co= nfigure --with-js-lib=3D/usr/lib/xulrunner-devel-${xulrunner_gre_version}/l= ib/ --with-js-include=3D/usr/lib/xulrunner-devel-${xulrunner_gre_version}/i= nclude/ && ERLC_FLAGS=3D+debug_info make dev + }}} + then use the following command to start a couchdb with local configuratio= n: + {{{ + xulrunner_gre_version=3D`xulrunner --gre-version` + LD_LIBRARY_PATH=3D/usr/lib/xulrunner-devel-${xulrunner_gre_version}/lib/ = ./utils/run + }}} + the debugger window should appear and using "Module" -> "Interpret..." wi= ll 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 browse= r to see calls coming in. +=20