WikiPrint - from Polar Technologies

Debugging Meeting

Kyle Oliver led this meeting which involved a review of debugging tools.

We didn't have any slides or handouts for the debugging demonstration (which covered GDB/DDD for debugging C++ code), but this Python Debugger Tutorial introducing the Python Debugger may be of interest as a standalone supplement. Basically, a debugger is incorporated into the Python language in a module called pdb. You import the module and then call the function pdb.set_trace() from whatever line you want debugging to begin at (think of this call as your first break point). When you run your code, it will catch at this line, and then you'll have a "(pdb)" prompt much like with GDB. From there you can set more breakpoints; do "steps," "nexts," "continues"; etc. It's pretty nifty.

If you'd rather not mess with a tutorial and just want a list of functions (found in the module itself) or commands (for when you're running the debugger at the (pdb) prompt), try here and here, respectively.