[Python-ideas] pdb.set_trace may not seem long

Sven Marnach sven at marnach.net
Mon Apr 9 16:43:33 CEST 2012

Yuval Greenfield schrieb am Mon, 09. Apr 2012, um 17:20:22 +0300:
> I find myself typing this a lot:
>     import pdb;pdb.set_trace()

What I do instead: I start pdb in Emacs, set a break point on the line
and run the script.  This should work in any other interactive
debugger for Python, too.

If for some reason you prefer to insert the above-mentioned line into
your source code, how about defining an editor macro for this purpose,
so you could do it with a single shortcut?


More information about the Python-ideas mailing list