Debugging Python

The tool to debug Python is pdb, think gdb for Python. It works, but it has warts.

The emacs integration is OK, but not great, the execution point glyph overwrites the first few columns of text. Breakpoints cannot be set on comments. Recoverable runtime errors cause it to bomb.

There’s an old fork for pdb to get ddd integration working, pydb. It basically doesn’t work. Setting breakpoints is very tricky. There’s no execution point glyph. Data structures don’t display.. which is why you use ddd in the first place. My plan is to get pydb working with ddd, then try to merge the pydb patches back upstream into pdb.

So many items added to the todo list..

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s


%d bloggers like this: