r1 - 26 Sep 2007 - 15:37:56 - ReidEllisYou are here: OSAF >  Developers Web  > DebuggingChandlerDesktop

Debugging Chandler Desktop

Using PDB

You can start Chandler with PDB using the -d flag: -d DEBUGON --debugOn=DEBUGON (these are equivalent). When an exception is raised, Chandler will drop into PDB.

If there is a specific section of code where you want to drop into PDB, just insert the line: import pdb; pdb.set_trace()

Using the Wing IDE

Got this from the dev mailing list.

Example Wing IDE settings for each of the platforms are below. They use John's home directory, so adjust as required for your directory setup.

Wing preferences

 #my changes
 gui.auto-save-before-action=true
 debug.exception-mode='never'


 #testing changes: make sure logfile exists
 #debug.passive-listen=true
 #debug.verbose=true
 #debug.logfile="logfile"
 #debug.persist-console=true

Platform-Specific Settings

Linux Release

Python executable:
/home/john/osaf/chandler/release/bin/python

Add to environment:
LD_LIBRARY_PATH=/home/john/osaf/chandler/release/lib:/home/john/osaf/chandler/release/db/lib:/home/john/osaf/chandler/release/icu/lib

Linux Debug

Python executable:
/home/john/osaf/chandler/debug/bin/python_d

Add to environment:
LD_LIBRARY_PATH=/home/john/osaf/chandler/debug/lib:/home/john/osaf/chandler/debug/db/lib:/home/john/osaf/chandler/debug/icu/lib

Mac Release

Python executable:
/Users/john/osaf/chandler/release/Library/Frameworks/Python.framework/Versions/Current/Resources/Python.app/Contents/MacOS/Python

Add to environment:
DYLD_LIBRARY_PATH=/Users/john/osaf/chandler/release/lib:/Users/john/osaf/chandler/release/db/lib:/Users/john/osaf/chandler/release/icu/lib
DYLD_FRAMEWORK_PATH=/Users/john/osaf/chandler/release/Library/Frameworks

Mac Debug

Python executable: /Users/john/osaf/chandler/debug/Library/Frameworks/Python.framework/Versions/Current/Resources/Python.app/Contents/MacOS/Python

Add to environment:
DYLD_LIBRARY_PATH=/Users/john/osaf/chandler/debug/lib:/Users/john/osaf/chandler/debug/db/lib:/Users/john/osaf/chandler/debug/icu/lib
DYLD_FRAMEWORK_PATH=/Users/john/osaf/chandler/debug/Library/Frameworks

Windows Release

Python executable:
d:\John\osaf\chandler\Chandler\release\bin\python.exe

Add to environment:
PATH=d:\John\osaf\chandler\Chandler\release\bin

Windows Debug

Python executable:
d:\John\osaf\chandler\debug\bin\python_d.exe

Add to environment:
PATH=d:\John\osaf\chandler\debug\bin

Edit | WYSIWYG | Attach | Printable | Raw View | Backlinks: Web, All Webs | History: r1 | More topic actions
 
Open Source Applications Foundation
Except where otherwise noted, this site and its content are licensed by OSAF under an Creative Commons License, Attribution Only 3.0.
See list of page contributors for attributions.