Professor Norm Matloff
University of California, Davis
I tend to use GUI debugging tools with Python, but often find that PDB is adequate or even superior. It loads instantly, doesn't take up much real estate on the screen, and its ability to set up aliases/macros is very valuable. (Note too Rocky Bernstein's new PYDBGR.)
However, I missed having a window that displays my source code and my current position in it, so I added such a window to PDB, using curses, somewhat analogously to the CGDB variant of GDB (and the -tui option in GDB). The result, Xpdb, is available at http://heather.cs.ucdavis.edu/~matloff/Python/Xpdb/Code/. It is nothing fancy at all, mainly just a source window capability added to PDB (though with a couple of extra new features).
python /usr/local/xpdb/Xsrcwin.py port_number
where port_number is some TCP port above 1024. I always use 2000.
You might as well leave the server up constantly. It will work across separate PDB sessions (though for simultaneous sessions you need separate servers).
python /usr/local/xpdb/Xpdb.py debuggee_full_path_name debuggee_command_line_arguments
updatebps source_file_name start_line increment
All line numbers of breakpoints starting at line start_line in source_file_name will be incremented by increment.