Skip to content

Instantly share code, notes, and snippets.

@reebalazs
Created November 25, 2013 13:15
Show Gist options
  • Save reebalazs/7641029 to your computer and use it in GitHub Desktop.
Save reebalazs/7641029 to your computer and use it in GitHub Desktop.
.pdbrc working with ipdb and PdbSublimeTextSupport
from PdbSublimeTextSupport import preloop, precmd
pdb.Pdb.preloop = preloop
pdb.Pdb.precmd = precmd
try:
from ipdb.__main__ import Pdb as ipdb_Pdb
except ImportError:
pass
else:
ipdb_Pdb.preloop = preloop
ipdb_Pdb.precmd = precmd
@phantomas1234
Copy link

Awesome, thanks

@ptim
Copy link

ptim commented Nov 12, 2015

Thanks! I get a couple of warnings when using this:

/Users/me/.virtualenvs/hs/lib/python2.7/site-packages/path.py:1719: DeprecationWarning: path is deprecated. Use Path instead.
  warnings.warn(msg, DeprecationWarning)

*** NameError: name 'pdb' is not defined
*** NameError: name 'pdb' is not defined
*** SyntaxError: unexpected EOF while parsing (<stdin>, line 1)
*** SyntaxError: invalid syntax (<stdin>, line 1)
*** SyntaxError: invalid syntax (<stdin>, line 1)

import pdb up top sorted out the first few, but I still get the three SyntaxErrors... does anyone know how to silence them?

https://gist.github.com/ptim/66d8db8a1f1e82639e1d

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment