Module pdb :: Class Pdb
[hide private]
[frames] | no frames]

Class Pdb

bdb.Bdb --+
          |
cmd.Cmd --+
          |
         Pdb
Known Subclasses:

Instance Methods [hide private]
 
__init__(self, completekey='tab', stdin=None, stdout=None)
Instantiate a line-oriented interpreter framework.
 
reset(self)
 
forget(self)
 
setup(self, f, t)
 
execRcLines(self)
 
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_line(self, frame)
This function is called when we stop or break at this line.
 
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
 
user_return(self, frame, return_value)
This function is called when a return trap is set here.
 
user_exception(self, frame, (exc_type, exc_value, exc_traceback))
This function is called if an exception occurs, but only if we are to stop at or just below this level.
 
interaction(self, frame, traceback)
 
default(self, line)
Called on an input line when the command prefix is not recognized.
 
precmd(self, line)
Handle alias expansion and ';;' separator.
 
onecmd(self, line)
Interpret the argument as though it had been typed in response to the prompt.
 
handle_command_def(self, line)
Handles one command line during command list definition.
 
do_h(self, arg)
 
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_break(self, arg, temporary=0)
 
defaultFile(self)
Produce a reasonable default.
 
do_b(self, arg, temporary=0)
 
do_tbreak(self, arg)
 
lineinfo(self, identifier)
 
checkline(self, filename, lineno)
Check whether specified line seems to be executable.
 
do_enable(self, arg)
 
do_disable(self, arg)
 
do_condition(self, arg)
 
do_ignore(self, arg)
arg is bp number followed by ignore count.
 
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 ...
 
do_cl(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 ...
 
do_where(self, arg)
 
do_w(self, arg)
 
do_bt(self, arg)
 
do_up(self, arg)
 
do_u(self, arg)
 
do_down(self, arg)
 
do_d(self, arg)
 
do_step(self, arg)
 
do_s(self, arg)
 
do_next(self, arg)
 
do_n(self, arg)
 
do_return(self, arg)
 
do_r(self, arg)
 
do_continue(self, arg)
 
do_cont(self, arg)
 
do_c(self, arg)
 
do_jump(self, arg)
 
do_j(self, arg)
 
do_debug(self, arg)
 
do_quit(self, arg)
 
do_q(self, arg)
 
do_exit(self, arg)
 
do_EOF(self, arg)
 
do_args(self, arg)
 
do_a(self, arg)
 
do_retval(self, arg)
 
do_rv(self, arg)
 
_getval(self, arg)
 
do_p(self, arg)
 
do_pp(self, arg)
 
do_list(self, arg)
 
do_l(self, arg)
 
do_whatis(self, arg)
 
do_alias(self, arg)
 
do_unalias(self, arg)
 
print_stack_trace(self)
 
print_stack_entry(self, frame_lineno, prompt_prefix='\n-> ')
 
help_help(self)
 
help_h(self)
 
help_where(self)
 
help_w(self)
 
help_bt(self)
 
help_down(self)
 
help_d(self)
 
help_up(self)
 
help_u(self)
 
help_break(self)
 
help_b(self)
 
help_clear(self)
 
help_cl(self)
 
help_tbreak(self)
 
help_enable(self)
 
help_disable(self)
 
help_ignore(self)
 
help_condition(self)
 
help_step(self)
 
help_s(self)
 
help_next(self)
 
help_n(self)
 
help_return(self)
 
help_r(self)
 
help_continue(self)
 
help_cont(self)
 
help_c(self)
 
help_jump(self)
 
help_j(self)
 
help_debug(self)
 
help_list(self)
 
help_l(self)
 
help_args(self)
 
help_a(self)
 
help_p(self)
 
help_pp(self)
 
help_exec(self)
 
help_quit(self)
 
help_q(self)
 
help_exit(self)
 
help_whatis(self)
 
help_EOF(self)
 
help_alias(self)
 
help_unalias(self)
 
help_commands(self)
 
help_pdb(self)
 
lookupmodule(self, filename)
Helper function for break/clear parsing -- may be overridden.
 
_runscript(self, filename)

Inherited from bdb.Bdb: break_anywhere, break_here, canonic, clear_all_breaks, clear_all_file_breaks, clear_bpbynumber, clear_break, dispatch_call, dispatch_exception, dispatch_line, dispatch_return, format_stack_entry, get_all_breaks, get_break, get_breaks, get_file_breaks, get_stack, run, runcall, runctx, runeval, set_break, set_continue, set_next, set_quit, set_return, set_step, set_trace, stop_here, trace_dispatch

Inherited from cmd.Cmd: cmdloop, columnize, complete, complete_help, completedefault, completenames, do_help, emptyline, get_names, parseline, postcmd, postloop, preloop, print_topics

Class Variables [hide private]
  commands_resuming = ['do_continue', 'do_step', 'do_next', 'do_...

Inherited from cmd.Cmd: doc_header, doc_leader, identchars, intro, lastcmd, misc_header, nohelp, prompt, ruler, undoc_header, use_rawinput

Method Details [hide private]

__init__(self, completekey='tab', stdin=None, stdout=None)
(Constructor)

 

Instantiate a line-oriented interpreter framework.

The optional argument 'completekey' is the readline name of a completion key; it defaults to the Tab key. If completekey is not None and the readline module is available, command completion is done automatically. The optional arguments stdin and stdout specify alternate input and output file objects; if not specified, sys.stdin and sys.stdout are used.

Overrides: cmd.Cmd.__init__
(inherited documentation)

reset(self)

 
Overrides: bdb.Bdb.reset

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.

Overrides: bdb.Bdb.user_call

user_line(self, frame)

 

This function is called when we stop or break at this line.

Overrides: bdb.Bdb.user_line

user_return(self, frame, return_value)

 

This function is called when a return trap is set here.

Overrides: bdb.Bdb.user_return

user_exception(self, frame, (exc_type, exc_value, exc_traceback))

 

This function is called if an exception occurs, but only if we are to stop at or just below this level.

Overrides: bdb.Bdb.user_exception

default(self, line)

 

Called on an input line when the command prefix is not recognized.

If this method is not overridden, it prints an error message and returns.

Overrides: cmd.Cmd.default
(inherited documentation)

precmd(self, line)

 

Handle alias expansion and ';;' separator.

Overrides: cmd.Cmd.precmd

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.

Overrides: cmd.Cmd.onecmd

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.

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

Overrides: bdb.Bdb.do_clear

do_cl(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

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.


Class Variable Details [hide private]

commands_resuming

Value:
['do_continue',
 'do_step',
 'do_next',
 'do_return',
 'do_quit',
 'do_jump']