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 products.pdbdebugmode

How to install Products.PDBDebugMode

  1. Download and install ActivePython
  2. Open Command Prompt
  3. Type pypm install products.pdbdebugmode
 Python 2.7Python 3.2Python 3.3
Windows (32-bit)
1.3.1 Available View build log
1.3 Available View build log
1.2 Available View build log
1.1 Available View build log
Windows (64-bit)
1.3.1 Available View build log
1.3 Available View build log
1.2 Available View build log
1.1 Available View build log
Mac OS X (10.5+)
1.3.1 Available View build log
1.3 Available View build log
1.2 Available View build log
1.1 Available View build log
Linux (32-bit)
1.3.1 Available View build log
1.3 Available View build log
1.2 Available View build log
1.1 Available View build log
Linux (64-bit)
1.3.1 Available View build log
1.3 Available View build log
1.2 Available View build log
1.1 Available View build log
 
License
GPL
Lastest release
version 1.3.1 on Apr 16th, 2011

Enable various PDB debugging when debug-mode=on

When Zope is running in debug mode this product hooks PDB debugging into various parts of a Zope instance. Some additional Plone specific hooks are also included.

Requirements

PDBDebugMode has been tested with Zope 2.8.5 and 2.10 but may well work with other versions.

If ipdb (http://pypi.python.org/pypi/ipdb) is available, it will use that instead of standard pdb.

Its recommended that you use an editor or IDE that can cooperate with pdb. Emacs for example, will display the corresponding lines of the source file alongside the pdb prompt.

Remember that this product does nothing unless zope is being run with debug-mode=on such as with "instance/bin/zopectl fg"

Post-Mortem Debugging

To provide for better investigation of errors, any error or exception logged with the python logging module will invoke pdb.post_mortem() if a traceback can be retrieved and set_trace will be invoked otherwise. Since the Zope error_log exception handler uses the logging module when logging errors, this provides for post mortem debugging of Zope errors. It is often useful, for example, to remove NotFound or Unauthorized from the ignored exception in error_log and then investigate such errors with PDB.

Runcall Requests

Any request that has the key 'pdb_runcall' will call the result of the request traversal in the debugger thus allowing for stepping through the resulting execution. To debug a POST or any other request which might be tricky to insert the 'pdb_runcall' key into, use '?toggle_runcall=1' at the end of a URL immediately preceding the POST to set a 'pdb_runcall' cookie which will then invoke the pdb.runcall when the POST is submitted. Use '?toggle_runcall=1' at the end of a URL to clear the cookie. Remember that the cookie will be set at the level in the hierarchy that it was set.

Alternatively, a view named 'pdb' is registered for all objects that will simply raise an exception leaving you with the current context to inspect.

Allow Import of pdb

Import of the pdb module is also allowed in unprotected code such as python scripts.

Changelog

1.3.1 - Unreleased

  • Apparently the ipdb support only works with ipdb 0.3 or greater. Added an "ipdb" extra for this requirement. [rossp]
  • Fix ipdb import in zcatalog.py. [pabo]

1.3 - 2011-01-14

  • Ignore invalid GenericSetup handlers. [rossp]
  • Use ipdb when available. [neaj]

1.2 - 2011-01-07

  • Add some zopectl scripts I use when evaluating upgrades. [rossp]
  • Better handling of exceptions while checking error matching. [rossp]
  • Fix a problem with doing post_mortem debugging of error_log ignored exceptions. [rossp]
  • Fix handling of socket errors
  • Fix handling of SiteErrorLog tracebacks
  • Fix handling of exc_info logging arg

1.1 - 2009-04-18

  • Fix a bug due to a change in monkeypatcher

1.0 - 2009-04-10

  • Add collective.monkeypatcher as a requirement [kdeldycke] 2009-04-09
  • Fix some recursion errors

0.3 - 2009-04-08

  • Use collective.monkeypatcher to move all patches into ZCML
  • Fully deprecate the Zope exception handler in favor of the logging hook since the Zope exception handler uses the logging module anyways and more can be done by hooking at that level.
  • Handle failed matches in Products.PDBDebugMode.pdblogging more gracefully
  • More flexible log matching. Change Products.PDBDebugMode.pdblogging.ignore_regexes to ignore_matchers and accept any callable.

0.2 - 2008-05-15

  • Eggified

0.1 - 2006-03-11

  • Initial release

Subscribe to package updates

Last updated Apr 16th, 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.