Merge pull request #676 from blueyed/python-debuggers

python: do not use multiple commands on a single line; add bpdb
This commit is contained in:
Louis Pilfold 2016-01-30 18:06:25 +00:00
commit e73c5b8036
2 changed files with 20 additions and 24 deletions

View File

@ -626,22 +626,6 @@ endsnippet
# Assertions & Tests #
#####################
snippet pdb "Set PDB breakpoint" b
import pdb; pdb.set_trace()
endsnippet
snippet ipy "Embed IPython shell" b
import IPython; IPython.embed()
endsnippet
snippet ipdb "Set IPDB breakpoint" b
import ipdb; ipdb.set_trace()
endsnippet
snippet pudb "Set PUDB breakpoint" b
import pudb; pudb.set_trace()
endsnippet
snippet ae "Assert equal" b
self.assertEqual(${1:${VISUAL:first}},${2:second})
endsnippet

View File

@ -128,31 +128,43 @@ snippet _
__${1:init}__
# python debugger (pdb)
snippet pdb
import pdb; pdb.set_trace()
import pdb
pdb.set_trace()
# bpython debugger (bpdb)
snippet bpdb
import bpdb
bpdb.set_trace()
# ipython debugger (ipdb)
snippet ipdb
import ipdb; ipdb.set_trace()
import ipdb
ipdb.set_trace()
# embed ipython itself
snippet iem
import IPython; IPython.embed()
import IPython
IPython.embed()
# ipython debugger (pdbbb)
snippet pdbbb
import pdbpp; pdbpp.set_trace()
import pdbpp
pdbpp.set_trace()
# remote python debugger (rpdb)
snippet rpdb
import rpdb; rpdb.set_trace()
import rpdb
rpdb.set_trace()
# ptpython
snippet ptpython
from ptpython.repl import embed
embed(globals(), locals(), vi_mode=${1:False}, history_filename=${2:None})
# python console debugger (pudb)
snippet pudb
import pudb; pudb.set_trace()
import pudb
pudb.set_trace()
# pdb in nosetests
snippet nosetrace
from nose.tools import set_trace; set_trace()
from nose.tools import set_trace
set_trace()
snippet pprint
import pprint; pprint.pprint(${1})
import pprint
pprint.pprint(${1})
snippet "
"""${0:doc}
"""