Jython Debugger
for stand alone or embedded Jython Debugging

Download jythondebugger

Comments or Questions

Installing the debugger
Using in stand alone mode
Using in embedded mode
Local Variables
Global Variables
Code Coverage
Call Stack
Break Points

Installing the debugger:
Unzip jythondebugger.zip to a location of your choice.

Using the debugger in stand alone mode:
For Windows users you can execute standalone.bat to run in stand alone mode.
You can also run it manually from the command line by including jython.jar and jythondebugger.jar in the classpath and executing jythondebugger.ScriptManagerFrame.

java -cp jython.jar;jythondebugger.jar jythondebugger.ScriptManagerFrame
Once the debugger is up and running you can load a script by choosing File->Load Python Script:

Once a script has been loaded you can execute it by selecting File->Execute.  If there are no breakpoints set the script will execute at full speed.  As other scripts are referenced by the currently executing script they will be loaded in to the debugger as a new tab.  Scripts can be preloaded and break points can be set ahead of time for scripts that you know will be loaded and referenced later.

Using the debugger in embedded mode:
To use the debugger in embedded mode you will need to make sure the jythondebugger.jar is in your classpath and that the included script Debugger.py is in your jython scripts path.  The easiest way to accomplish this is to place it with your currently existing scripts.  A breakpoint can be placed anywhere in your jython script by placing the line "import Debugger".  This will cause the jython debugger to get loaded and stop and the next line of jython execution.  You can see an example of embedded mode by running Embedded.bat or by executing the following command line:
java -cp jython.jar;jythondebugger.jar;./ Embedded
The example will stop at the line following "import debugger".  You can then step through or create your own breakpoints or watches.  When the script has finished you can re-execute it by selecting File->Execute.

Code Coverage:
Yellow highlighting indicates lines that have been executed.
Toggle Code Coverage on/off in View menu.

Global Variables:

Call Stack:
Clicking on call stack lines will take you to that line of code.

Break Points:
Click on  left column to create a breakpoint on a line.
Right click on left column to create or edit a breakpoint.

Can be any valid expression