pdb
index
/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/pdb.py
Module Docs

A Python debugger.

 
Modules
       
bdb
cmd
linecache
os
pprint
re
sys
traceback

 
Classes
       
bdb.Bdb
Pdb(bdb.Bdb, cmd.Cmd)
cmd.Cmd
Pdb(bdb.Bdb, cmd.Cmd)

 
class Pdb(bdb.Bdb, cmd.Cmd)
    
Method resolution order:
Pdb
bdb.Bdb
cmd.Cmd

Methods defined here:
__init__(self, completekey='tab', stdin=None, stdout=None, skip=None)
bp_commands(self, frame)
Call every command that was set for the current active breakpoint
(if there is one).
 
Returns True if the normal interaction function must be called,
False otherwise.
checkline(self, filename, lineno)
Check whether specified line seems to be executable.
 
Return `lineno` if it is, 0 if not (e.g. a docstring, comment, blank
line or EOF). Warning: testing is not comprehensive.
default(self, line)
defaultFile(self)
Produce a reasonable default.
displayhook(self, obj)
Custom displayhook for the exec in default(), which prevents
assignment of the _ variable in the builtins.
do_EOF(self, arg)
do_a = do_args(self, arg)
do_alias(self, arg)
do_args(self, arg)
do_b = do_break(self, arg, temporary=0)
do_break(self, arg, temporary=0)
do_bt = do_where(self, arg)
do_c = do_continue(self, arg)
do_cl = do_clear(self, arg)
do_clear(self, arg)
Three possibilities, tried in this order:
clear -> clear all breaks, ask for confirmation
clear file:lineno -> clear all breaks at file:lineno
clear bpno bpno ... -> clear breakpoints by number
do_commands(self, arg)
Defines a list of commands associated to a breakpoint.
 
Those commands will be executed whenever the breakpoint causes
the program to stop execution.
do_condition(self, arg)
do_cont = do_continue(self, arg)
do_continue(self, arg)
do_d = do_down(self, arg)
do_debug(self, arg)
do_disable(self, arg)
do_down(self, arg)
do_enable(self, arg)
do_exit = do_quit(self, arg)
do_h = do_help(self, arg)
List available commands with "help" or detailed help with "help cmd".
do_ignore(self, arg)
arg is bp number followed by ignore count.
do_j = do_jump(self, arg)
do_jump(self, arg)
do_l = do_list(self, arg)
do_list(self, arg)
do_n = do_next(self, arg)
do_next(self, arg)
do_p(self, arg)
do_pp(self, arg)
do_q = do_quit(self, arg)
do_quit(self, arg)
do_r = do_return(self, arg)
do_restart = do_run(self, arg)
do_return(self, arg)
do_retval(self, arg)
do_run(self, arg)
Restart program by raising an exception to be caught in the main
debugger loop.  If arguments were given, set them in sys.argv.
do_rv = do_retval(self, arg)
do_s = do_step(self, arg)
do_step(self, arg)
do_tbreak(self, arg)
do_u = do_up(self, arg)
do_unalias(self, arg)
do_unt = do_until(self, arg)
do_until(self, arg)
do_up(self, arg)
do_w = do_where(self, arg)
do_whatis(self, arg)
do_where(self, arg)
execRcLines(self)
# Can be executed earlier than 'setup' if desired
forget(self)
handle_command_def(self, line)
Handles one command line during command list definition.
help_EOF(self)
help_a(self)
help_alias(self)
help_args(self)
help_b(self)
help_break(self)
help_bt = help_w(self)
help_c(self)
help_cl(self)
help_clear(self)
help_commands(self)
help_condition(self)
help_cont(self)
help_continue(self)
help_d(self)
help_debug(self)
help_disable(self)
help_down(self)
help_enable(self)
help_exec(self)
help_exit = help_q(self)
help_h(self)
help_help(self)
help_ignore(self)
help_j(self)
help_jump(self)
help_l(self)
help_list(self)
help_n(self)
help_next(self)
help_p(self)
help_pdb(self)
help_pp(self)
help_q(self)
help_quit(self)
help_r(self)
help_restart = help_run(self)
help_return(self)
help_run(self)
help_s(self)
help_step(self)
help_tbreak(self)
help_u(self)
help_unalias(self)
help_unt(self)
help_until(self)
help_up(self)
help_w(self)
help_whatis(self)
help_where(self)
interaction(self, frame, traceback)
lineinfo(self, identifier)
lookupmodule(self, filename)
Helper function for break/clear parsing -- may be overridden.
 
lookupmodule() translates (possibly incomplete) file or module name
into an absolute file name.
onecmd(self, line)
Interpret the argument as though it had been typed in response
to the prompt.
 
Checks whether this line is typed at the normal prompt or in
a breakpoint command list definition.
precmd(self, line)
Handle alias expansion and ';;' separator.
print_stack_entry(self, frame_lineno, prompt_prefix='\n-> ')
print_stack_trace(self)
reset(self)
setup(self, f, t)
user_call(self, frame, argument_list)
This method is called when there is the remote possibility
that we ever need to stop in this function.
user_exception(self, frame, exc_info)
This function is called if an exception occurs,
but only if we are to stop at or just below this level.
user_line(self, frame)
This function is called when we stop or break at this line.
user_return(self, frame, return_value)
This function is called when a return trap is set here.

Data and other attributes defined here:
commands_resuming = ['do_continue', 'do_step', 'do_next', 'do_return', 'do_quit', 'do_jump']

Methods inherited from bdb.Bdb:
break_anywhere(self, frame)
break_here(self, frame)
canonic(self, filename)
clear_all_breaks(self)
clear_all_file_breaks(self, filename)
clear_bpbynumber(self, arg)
clear_break(self, filename, lineno)
dispatch_call(self, frame, arg)
dispatch_exception(self, frame, arg)
dispatch_line(self, frame)
dispatch_return(self, frame, arg)
format_stack_entry(self, frame_lineno, lprefix=': ')
get_all_breaks(self)
get_break(self, filename, lineno)
get_breaks(self, filename, lineno)
get_file_breaks(self, filename)
get_stack(self, f, t)
is_skipped_module(self, module_name)
run(self, cmd, globals=None, locals=None)
runcall(self, func, *args, **kwds)
runctx(self, cmd, globals, locals)
runeval(self, expr, globals=None, locals=None)
set_break(self, filename, lineno, temporary=0, cond=None, funcname=None)
set_continue(self)
set_next(self, frame)
Stop on the next line in or below the given frame.
set_quit(self)
set_return(self, frame)
Stop when returning from the given frame.
set_step(self)
Stop after one line of code.
set_trace(self, frame=None)
Start debugging from `frame`.
 
If frame is not specified, debugging starts from caller's frame.
set_until(self, frame)
Stop when the line with the line no greater than the current one is
reached or when returning from current frame
stop_here(self, frame)
trace_dispatch(self, frame, event, arg)

Methods inherited from cmd.Cmd:
cmdloop(self, intro=None)
Repeatedly issue a prompt, accept input, parse an initial prefix
off the received input, and dispatch to action methods, passing them
the remainder of the line as argument.
columnize(self, list, displaywidth=80)
Display a list of strings as a compact set of columns.
 
Each column is only as wide as necessary.
Columns are separated by two spaces (one was not legible enough).
complete(self, text, state)
Return the next possible completion for 'text'.
 
If a command has not been entered, then complete against command list.
Otherwise try to call complete_<command> to get list of completions.
complete_help(self, *args)
completedefault(self, *ignored)
Method called to complete an input line when no command-specific
complete_*() method is available.
 
By default, it returns an empty list.
completenames(self, text, *ignored)
do_help(self, arg)
List available commands with "help" or detailed help with "help cmd".
emptyline(self)
Called when an empty line is entered in response to the prompt.
 
If this method is not overridden, it repeats the last nonempty
command entered.
get_names(self)
parseline(self, line)
Parse the line into a command name and a string containing
the arguments.  Returns a tuple containing (command, args, line).
'command' and 'args' may be None if the line couldn't be parsed.
postcmd(self, stop, line)
Hook method executed just after a command dispatch is finished.
postloop(self)
Hook method executed once when the cmdloop() method is about to
return.
preloop(self)
Hook method executed once when the cmdloop() method is called.
print_topics(self, header, cmds, cmdlen, maxcol)

Data and other attributes inherited from cmd.Cmd:
doc_header = 'Documented commands (type help <topic>):'
doc_leader = ''
identchars = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_'
intro = None
lastcmd = ''
misc_header = 'Miscellaneous help topics:'
nohelp = '*** No help on %s'
prompt = '(Cmd) '
ruler = '='
undoc_header = 'Undocumented commands:'
use_rawinput = 1

 
Functions
       
help()
# print help
pm()
post_mortem(t=None)
run(statement, globals=None, locals=None)
runcall(*args, **kwds)
runctx(statement, globals, locals)
runeval(expression, globals=None, locals=None)
set_trace()

 
Data
        __all__ = ['run', 'pm', 'Pdb', 'runeval', 'runctx', 'runcall', 'set_trace', 'post_mortem', 'help']