feature proposal, debug on exception

alex23 wuwei23 at gmail.com
Wed May 21 01:52:01 EDT 2008


On May 21, 10:59 am, Paul Rubin <http://phr...@NOSPAM.invalid> wrote:
> I'd like to propose that debug-on-exception be made into a standard
> feature that is easy to enable, e.g. with a command line option
> or with a simple pdb call immediately after the import:

Forgive me if I've missed your point, but it seems you can already do
this:

	pdb.py can also be invoked as a script to debug other scripts.
	For example:

	python -m pdb myscript.py

	When invoked as a script, pdb will automatically enter post-mortem
	debugging if the program being debugged exits abnormally. After
	post-mortem debugging (or after normal exit of the program), pdb
	will restart the program. Automatic restarting preserves pdb's
	state (such as breakpoints) and in most cases is more useful than
	quitting the debugger upon program's exit. New in version 2.4:
	Restarting post-mortem behavior added.

http://docs.python.org/lib/module-pdb.html



More information about the Python-list mailing list