print 'h(elp)\n\tWithout argument, print the list of available commands.\n\tWith a command name as argument, print help about that command\n\t"help pdb" pipes the full documentation file to the $PAGER\n\t"help exec" gives help on the ! command'
def help_where(self):
self.help_w()
def help_w(self):
print 'w(here)\n\tPrint a stack trace, with the most recent frame at the bottom.\n\tAn arrow indicates the "current frame", which determines the\n\tcontext of most commands.'
def help_down(self):
self.help_d()
def help_d(self):
print 'd(own)\n\tMove the current frame one level down in the stack trace\n\t(to an older frame).'
def help_up(self):
self.help_u()
def help_u(self):
print 'u(p)\n\tMove the current frame one level up in the stack trace\n\t(to a newer frame).'
def help_break(self):
self.help_b()
def help_b(self):
print "b(reak) ([file:]lineno | function) [, condition]\n\tWith a line number argument, set a break there in the current\n\tfile. With a function name, set a break at first executable line\n\tof that function. Without argument, list all breaks. If a second\n\targument is present, it is a string specifying an expression\n\twhich must evaluate to true before the breakpoint is honored.\n\n\tThe line number may be prefixed with a filename and a colon,\n\tto specify a breakpoint in another file (probably one that\n\thasn't been loaded yet). The file is searched for on sys.path;\n\tthe .py suffix may be omitted."
def help_clear(self):
self.help_cl()
def help_cl(self):
print 'cl(ear) filename:lineno'
print 'cl(ear) [bpnumber [bpnumber...]]\n\tWith a space separated list of breakpoint numbers, clear\n\tthose breakpoints. Without argument, clear all breaks (but\n\tfirst ask confirmation). With a filename:lineno argument,\n\tclear all breaks at that line in that file.\n\n\tNote that the argument is different from previous versions of\n\tthe debugger (in python distributions 1.5.1 and before) where\n\ta linenumber was used instead of either filename:lineno or\n\tbreakpoint numbers.'
def help_tbreak(self):
print 'tbreak same arguments as break, but breakpoint is\n\tremoved when first hit.'
def help_enable(self):
print 'enable bpnumber [bpnumber ...]\n\tEnables the breakpoints given as a space separated list of\n\tbp numbers.'
def help_disable(self):
print 'disable bpnumber [bpnumber ...]\n\tDisables the breakpoints given as a space separated list of\n\tbp numbers.'
def help_ignore(self):
print 'ignore bpnumber count\n\tSets the ignore count for the given breakpoint number. A breakpoint\n\tbecomes active when the ignore count is zero. When non-zero, the\n\tcount is decremented each time the breakpoint is reached and the\n\tbreakpoint is not disabled and any associated condition evaluates\n\tto true.'
def help_condition(self):
print 'condition bpnumber str_condition\n\tstr_condition is a string specifying an expression which\n\tmust evaluate to true before the breakpoint is honored.\n\tIf str_condition is absent, any existing condition is removed;\n\ti.e., the breakpoint is made unconditional.'
def help_step(self):
self.help_s()
def help_s(self):
print 's(tep)\n\tExecute the current line, stop at the first possible occasion\n\t(either in a function that is called or in the current function).'
def help_next(self):
self.help_n()
def help_n(self):
print 'n(ext)\n\tContinue execution until the next line in the current function\n\tis reached or it returns.'
def help_return(self):
self.help_r()
def help_r(self):
print 'r(eturn)\n\tContinue execution until the current function returns.'
def help_continue(self):
self.help_c()
def help_cont(self):
self.help_c()
def help_c(self):
print 'c(ont(inue))\n\tContinue execution, only stop when a breakpoint is encountered.'
def help_list(self):
self.help_l()
def help_l(self):
print 'l(ist) [first [,last]]\n\tList source code for the current file.\n\tWithout arguments, list 11 lines around the current line\n\tor continue the previous listing.\n\tWith one argument, list 11 lines starting at that line.\n\tWith two arguments, list the given range;\n\tif the second argument is less than the first, it is a count.'
def help_args(self):
self.help_a()
def help_a(self):
print 'a(rgs)\n\tPrint the arguments of the current function.'
def help_p(self):
print 'p expression\n\tPrint the value of the expression.'
def help_exec(self):
print "(!) statement\n\tExecute the (one-line) statement in the context of\n\tthe current stack frame.\n\tThe exclamation point can be omitted unless the first word\n\tof the statement resembles a debugger command.\n\tTo assign to a global variable you must always prefix the\n\tcommand with a 'global' command, e.g.:\n\t(Pdb) global list_options; list_options = ['-l']\n\t(Pdb)"
def help_quit(self):
self.help_q()
def help_q(self):
print 'q(uit)\tQuit from the debugger.\n\tThe program being executed is aborted.'
def help_whatis(self):
print 'whatis arg\n\tPrints the type of the argument.'
def help_EOF(self):
print 'EOF\n\tHandles the receipt of EOF as a command.'
def help_alias(self):
print 'alias [name [command [parameter parameter ...] ]]\n\tCreates an alias called \'name\' the executes \'command\'. The command\n\tmust *not* be enclosed in quotes. Replaceable parameters are\n\tindicated by %1, %2, and so on, while %* is replaced by all the \n\tparameters. If no command is given, the current alias for name\n\tis shown. If no name is given, all aliases are listed.\n\t\n\tAliases may be nested and can contain anything that can be\n\tlegally typed at the pdb prompt. Note! You *can* override\n\tinternal pdb commands with aliases! Those internal commands\n\tare then hidden until the alias is removed. Aliasing is recursively\n\tapplied to the first word of the command line; all other words\n\tin the line are left alone.\n\n\tSome useful aliases (especially when placed in the .pdbrc file) are:\n\n\t#Print instance variables (usage "pi classInst")\n\talias pi for k in %1.__dict__.keys(): print "%1.",k,"=",%1.__dict__[k]\n\n\t#Print instance variables in self\n\talias ps pi self\n\t'
def help_unalias(self):
print 'unalias name\n\tDeletes the specified alias.'