Welcome, guest | Sign In | My Account | Store | Cart

Notice! PyPM is being replaced with the ActiveState Platform, which enhances PyPM’s build and deploy capabilities. Create your free Platform account to download ActivePython or customize Python with the packages you require and get automatic updates.

Download
ActivePython
INSTALL>
pypm install dm.pdb

How to install dm.pdb

  1. Download and install ActivePython
  2. Open Command Prompt
  3. Type pypm install dm.pdb
 Python 2.7Python 3.2Python 3.3
Windows (32-bit)
1.1 Available View build log
Windows (64-bit)
1.1 Available View build log
Mac OS X (10.5+)
1.1 Available View build log
Linux (32-bit)
1.1 Available View build log
Linux (64-bit)
1.1 Available View build log
 
Author
License
BSD (see "dm/pdb/LICENSE.txt", for details)
Dependencies
Imports
Lastest release
version 1.1 on Jan 5th, 2011

Pdb, the Python debugger, has severe limitations (apart from some bugs). This extension tries to get rid of some of them.

Things done

  • setting breakpoints

Allow filename to specify a module as well.

Allow setting breakpoints from outside via do_break. This is useful for debug setups.

  • exception display

The current display of an exception is almost useless. In the Pdb code, exceptions are displayed at 4 places -- and each of them uses slightly different code (whow!).

We consolidate this into a single function _handle_exception and present the exception with traceback.format_exception_only. We also store the exception in the Pdb instance. A new command exception (abbreviated e) presents this stored exception value in a way similar to the where command.

  • where command improvements
  • each frame identifies its level (the top frame is at level 0,

System Message: WARNING/2 (<string>, line 33)

Bullet list ends without a blank line; unexpected unindent.

the one below it at level 1, etc...)

  • the current frame is marked as such
  • where gets optional arguments number and end

number controls how many frames are displayed (default: maxint), end at what level the display ends, negative numbers count from the bottom (default: -1, i.e. the bottom frame).

  • new command frame level (abbr: f)

switch to call frame at level

without argument, provide info about current frame

  • allow to customize the display of the where command

System Message: WARNING/2 (<string>, line 50)

Bullet list ends without a blank line; unexpected unindent.

and of tracebacks e.g. to display additional debugging information as provided by Zope (for example).

This can be done by customizing getAdditionalFrameInfo.

Things not yet done

  • Returning from debug occasionally returns to stop

System Message: WARNING/2 (<string>, line 60)

Bullet list ends without a blank line; unexpected unindent.

rather than where we entered the recursive debugger. This is often nasty (and should be fixed)

Version history

1.1
  • improved handling of errors in command argument parsing
  • Python 2.6 compatibility
1.0.4
  • work around Python monkey patching set_trace inside a doctest.
1.0.3
  • fix debug to use the current Pdb class, not Python's.
1.0.2
  • let external calls to do_break work even after the first run.

Subscribe to package updates

Last updated Jan 5th, 2011

Download Stats

Last month:2

What does the lock icon mean?

Builds marked with a lock icon are only available via PyPM to users with a current ActivePython Business Edition subscription.

Need custom builds or support?

ActivePython Enterprise Edition guarantees priority access to technical support, indemnification, expert consulting and quality-assured language builds.

Plan on re-distributing ActivePython?

Get re-distribution rights and eliminate legal risks with ActivePython OEM Edition.