Skip to main content


Project description


You’ll need GDB compiled with python support, and the pdbinject package:

easy_install pdbinject

OS X Notes

The default GDB does not come compiled with Python support.

Homebrew fixes that:

brew install gdb


There’s more steps, I gave up on figuring out how to make it work.


$ python example/ &
Process running with PID 6319

$ sudo pdbinject 6319
Remote PDB has been configured on port 4444

        nc 4444

$ nc 4444
> /home/ubuntu/pdbinject/pdbinject/>None
-> debugger.set_trace()

Now have some fun:

from guppy import hpy
hp = hpy()
heap = hp.heap()

To print the stacktrace across all the threads:

import sys, traceback
for thread_id, stack in sys._current_frames().iteritems(): print 'Thread id: %s\n%s' % (thread_id, ''.join(traceback.format_stack(stack)))

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 pdbinject, version 0.2.0
Filename, size File type Python version Upload date Hashes
Filename, size pdbinject-0.2.0.tar.gz (3.5 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