O'Reilly logo

Python Essential Reference, Second Edition by David M Beazley

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

The Python Debugger

The Python debugger is loaded by importing the pdb module. The pdb module provides an interactive source code debugger that allows post-mortem debugging, inspection of stack frames, breakpoints, single stepping of source lines, and code evaluation.

The debugger is started by loading the pdb module and issuing one of the following functions:

					run(statement
					[,
					globals
					[,
					locals]])
				

Executes the string statement under debugger control. The debugger prompt will appear immediately before any code executes. Typing 'continue' will force it to run. globals and locals define the global and local namespaces in which the code runs.

					runeval(expression
					[,
					globals
					[,
					locals]])
				

Evaluates the expression string under debugger control. The ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required