C:\>perl -wde1 Default die handler restored. Loading DB routines from perl5db.pl version 1.07 Editor support available. Enter h or `h h' for help, or `perldoc perldebug' for more help. main::(-e:1): 1 DB<1>
"Ah! Help!"
DB<1>h T Stack trace. s [expr] Single step [in expr]. n [expr] Next, steps over subroutine calls [in expr]. <CR> Repeat last n or s command. r Return from current subroutine. c [line|sub] Continue; optionally inserts a one-time-only breakpoin +t at the specified position. l min+incr List incr+1 lines starting at min. l min-max List lines min through max. l line List single line. l subname List first window of lines from subroutine. l $var List first window of lines from subroutine referenced +by $var. l List next window of lines. - List previous window of lines. w [line] List window around line. . Return to the executed line.
"Um!"
f filename Switch to viewing filename. File must be already loade +d. filename may be either the full name of the file, or a + regular expression matching the full file name: f /home/me/foo.pl and f oo\. may access the same file. Evals (with saved bodies) are considered to be filenam +es: f (eval 7) and f eval 7\b access the body of the 7th e +val (in the order of execution). /pattern/ Search forwards for pattern; final / is optional. ?pattern? Search backwards for pattern; final ? is optional. L List all breakpoints and actions. S [[!]pattern] List subroutine names [not] matching pattern. t Toggle trace mode. t expr Trace through execution of expr. b [line] [condition] Set breakpoint; line defaults to the current execution + line; condition breaks if it evaluates to true, defaults to +'1'. b subname [condition] Set breakpoint at first line of subroutine. b $var Set breakpoint at first line of subroutine referenced +by $var. b load filename Set breakpoint on `require'ing the given file. b postpone subname [condition] Set breakpoint at first line of subroutine after it is compiled. b compile subname Stop after the subroutine is compiled. d [line] Delete the breakpoint for line. D Delete all breakpoints. a [line] command Set an action to be done before the line is executed; line defaults to the current execution line. Sequence is: check for breakpoint/watchpoint, print li +ne if necessary, do action, prompt user if necessary, execute line. a [line] Delete the action for line. A Delete all actions. W expr Add a global watch-expression. W Delete all watch-expressions. V [pkg [vars]] List some (default all) variables in package (default +current). Use ~pattern and !pattern for positive and negative re +gexps. X [vars] Same as "V currentpackage [vars]". x expr Evals expression in list context, dumps the result. m expr Evals expression in list context, prints methods calla +ble on the first element of the result. m class Prints methods callable via the given class. < ? List Perl commands to run before each prompt. < expr Define Perl command to run before each prompt. << expr Add to the list of Perl commands to run before each pr +ompt. > ? List Perl commands to run after each prompt. > expr Define Perl command to run after each prompt. >> expr Add to the list of Perl commands to run after each pro +mpt. { db_command Define debugger command to run before each prompt. { ? List debugger commands to run before each prompt. < expr Define Perl command to run before each prompt. {{ db_command Add to the list of debugger commands to run before eac +h prompt. ! number Redo a previous command (default previous command). ! -number Redo number'th-to-last command. ! pattern Redo last command that started with pattern. See 'O recallCommand' too. !! cmd Run cmd in a subprocess (reads from DB::IN, writes to +DB::OUT) See 'O shellBang' too. H -number Display last number commands (default all). p expr Same as "print {DB::OUT} expr" in current package. |dbcmd Run debugger command, piping DB::OUT to current pager. ||dbcmd Same as |dbcmd but DB::OUT is temporarilly select()ed +as well. = [alias value] Define a command alias, or list current aliases. command Execute as a perl statement in current package. v Show versions of loaded modules. R Pure-man-restart of debugger, some of debugger state and command-line options may be lost. Currently the following setting are preserved: history, breakpoints and actions, debugger Options and the following command-line options: -w, -I, -e. O [opt] ... Set boolean option to true O [opt?] Query options O [opt=val] [opt="val"] ... Set options. Use quotes in spaces in value. recallCommand, ShellBang chars used to recall command or spawn she +ll; pager program for output of "|cmd"; tkRunning run Tk while prompting (with ReadLine); signalLevel warnLevel dieLevel level of verbosity; inhibit_exit Allows stepping off the end of the script. ImmediateStop Debugger should stop as early as possible. RemotePort Remote hostname:port for remote debugging The following options affect what happens with V, X, and x commands: arrayDepth, hashDepth print only first N elements ('' for all); compactDump, veryCompact change style of array and hash dump; globPrint whether to print contents of globs; DumpDBFiles dump arrays holding debugged files; DumpPackages dump symbol tables of packages; DumpReused dump contents of "reused" addresses; quote, HighBit, undefPrint change style of string dump; bareStringify Do not print the overload-stringified value; Other options include: PrintRet affects printing of return value after r comma +nd, frame affects printing messages on entry and exit fr +om subroutines. AutoTrace affects printing messages on every possible br +eaking point. maxTraceLen gives maximal length of evals/args listed in s +tack trace. ornaments affects screen appearance of the command line. During startup options are initialized from $ENV{PERLDB_OPTS}. You can put additional initialization options TTY, noTTY, ReadLine, NonStop, and RemotePort there (or use `R' after you set them). q or ^D Quit. Set $DB::finished = 0 to debug global destructio +n. h [db_command] Get help [on a specific debugger command], enter |h to + page. h h Summary of debugger commands. perldoc manpage Runs the external doc viewer perldoc command on the named Perl manpage, or on perldoc itself if omitted. Set $DB::doccmd to change viewer. Type `|h' for a paged display if this was too hard to read. DB<1>
In reply to Re: Re^2: Perl What for?
by BrowserUk
in thread Perl What for?
by NoobiePerlist
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |