According to their website: "Winpdb is an advanced python debugger, with support for smart breakpoints, multiple threads, namespace modification, embedded debugging, encrypted communication and speed of up to 20 times that of pdb."
How to use Winpdb with Dabo
First, get the latest version of Winpdb from their website, and install it like any other Python module.
To run the debugger from the middle of your dabo app's execution requires two steps so you can run the debugger as a client/server mode. Step 1: Client side In your dabo or your own python script add the line:
import rpdb2; rpdb2.start_embedded_debugger(password)
Add the following line to any script you wish to debug with the embedded debugging technique.
Once this line is invoked, the script will freeze for a default period of 5 minutes, waiting for a debugger to attach.
The password is used to secure client/server (debugger/debuggee) communication. Run your dabo application to trigger the embedded debugger.
The screen will freeze for 5 minutes. Run winpdb to bring up the debugger. Select File -> Password and enter the password you entered in
your script rpdb2.start_embedded_debugger(password). Next you need to Select File -> Attach that will list PID and filename item. Selected
the item to connect to your rpdb2.start_embedded_debugger(password). You will get warning messages about the problems using any pdb import
modules. In other words you can not use pdb at the same time with winpdb.
Most of the time when you are running Dabo code you won't need the debugger, which obviously adds some processing overhead, so when you want to debug, run Winpdb. There should be a script named winpdb.py that is installed; this is the script to launch the debugger.
Once the debugger is running, select Launch from the File menu, and select the main script for your app. After a few seconds the script will have been launched, with the execution paused at the first line. From here you can scroll through the script and set breakpoints, so that your app pauses in the debugger when it reaches those parts which you need to debug. Then run your app by selecting Go from the Control menu (or press F5).
The app will then run normally until you reach a breakpoint. Execution will stop there, and you can then inspect the values of any variables to make sure they are correct, and then step through the code as needed to identify where it is not behaving correctly. All of the controls for stepping through code are in the Control menu; they also have keyboard shortcuts. You can also use the toolbar at the top of the debugger form, but I find that less convenient.