

post_mortem ( traceback = None ) ¶Įnter post-mortem debugging of the given traceback object. Header is printed to the console just before debugging begins.Ĭhanged in version 3.7: The keyword-only argument header.

Python2.7 isnt a recognized internal dcommand code#
This is useful to hard-codeĪ breakpoint at a given point in a program, even if the code is not set_trace ( *, header = None ) ¶Įnter the debugger at the calling stack frame. The debugger prompt appears as soon as the function When runcall() returns, it returns whatever theįunction call returned. runcall ( function, * args, ** kwds ) ¶Ĭall the function (a function or method object, not a string) with the Otherwise this function is similar to run(). When runeval() returns, it returns the value of theĮxpression. runeval ( expression, globals = None, locals = None ) ¶Įvaluate the expression (given as a string or a code object) under debuggerĬontrol. (See the explanation of the built-inĮxec() or eval() functions.) pdb. The optional globals and locals arguments specify theĮnvironment in which the code is executed by default the dictionary of the Statement using step or next (all these commands areĮxplained below). Set breakpoints and type continue, or you can step through the The debugger prompt appears before any code is executed you can run ( statement, globals = None, locals = None ) ¶Įxecute the statement (given as a string or a code object) under debuggerĬontrol. The module defines the following functions each enters the debugger in a

> f ( 0 ) Traceback (most recent call last):įile "", line 2, in f ZeroDivisionError: division by zero > pdb.
