Skip to main content
Python Software Foundation 20th Year Anniversary Fundraiser  Donate today!

Display source code in your editor while debugging with pdb.

Project description

This module is used to hook up pdb, the python debugger, with your editor. This enables it to display the debugged source code during a pdb session.

You can install with pip:

$ pip install PdbEditorSupport

Or download, unpack the package and install with:

$ python install

Next you need to hook up pdb with this module. See the next sections to see how.

Afterwards your editor should get started automatically whenever you enter a debug session. The current source line will be displayed simultaneously while stepping through the code.


Sublime Text

For Sublime Text support add this to .pdbrc:

import PdbEditorSupport

Ensure that the subl command line tool has been installed as per these instructions.

The subl command will by default called with -b filename:lineno, where filename and lineno are replaced accordingly.

You can change the default subl command by setting the command keyword option.

You can change the default arguments with the command_args keyword option.

Example with the defaults:

import PdbEditorSupport
    command_args=['-b', '{filename}:{lineno}'])


For Sublime Text support add this to .pdbrc:

import PdbEditorSupport

You can change the default TextMate application name with the application keyword option.

You can change the default url used via Apple Script with the url keyword option.

Example with the defaults:

import PdbEditorSupport

Other editors

Other editors which allow opening files via the command line can be used as well.

You can use arbitrary shell commands like this:

import PdbEditorSupport


This module is based on PdbSublimeTextSupport by Martin Aspeli, which in turn is based on PdbTextMateSupport by Andi Zeidler and others.


0.4.0 (2018-07-31)

  • Better Python 2.7 support. [fschulze]
  • Fix nested pdb. [fschulze]

0.3.0 (2018-07-28)

  • Initial release after fork from PdbSublimeTextSupport and PdbTextMateSupport. [fschulze]

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for PdbEditorSupport, version 0.4.0
Filename, size File type Python version Upload date Hashes
Filename, size PdbEditorSupport-0.4.0-py2-none-any.whl (3.6 kB) File type Wheel Python version 2 Upload date Hashes View
Filename, size PdbEditorSupport-0.4.0.tar.gz (4.0 kB) File type Source Python version None Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring DigiCert DigiCert EV certificate Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page