Debugging Python code

On first search, you will see a lot of options and obvious conclusion is that you will not be satisfied.

Most people just prefers plain import pdb; pdb.set_trace() and python -m pdb

Start at and

If you like vim two options with the same name (just different case): (actively maintained) (no commits since Oct 16, 2007 )

First one is actively maintained, second one didn’t work right for me.
Simplest explanation i found how the first one is from:

How does (should) that work?
vimpdb is a subclass of pdb.Pdb, which hijacks the command loop and listens for UDP packets on port 6666 (blocking). To inform the VIM process what’s happening, it uses VIM’s remote commands.
On the VIM side there’s basically just a VIM script which does the higlight, set up the menu, and defines a function to send UDP messages.
That’s all.

For the rest go to github page for whole README.

I also use Eric4 IDE for it’s debugging capabilities, and first thing to notice that Eric needs that debugger more than you.
It is still functioning, if all other bloat and strange configuration does not bother you too much.
winpdb is wxWidgets option, works on multiple operative systems, most usable off all, but depends what you are looking for, and how much will it disrupt your coding session. Sometimes it is harder to switch from favorite editor to full blown GUI for debugging, then staying in the same place, or switching to console debugger. And having wxWidgets installed is just filthy.


winpdb screenshot


Leave a Reply

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

You are commenting using your 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