⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 perldebug.1

📁 视频监控网络部分的协议ddns,的模块的实现代码,请大家大胆指正.
💻 1
📖 第 1 页 / 共 4 页
字号:
Run the debugger command, piping \s-1DB::OUT\s0 into your current pager..IP "||dbcmd" 12.IX Xref "debugger command, ||".IX Item "||dbcmd"Same as \f(CW\*(C`|dbcmd\*(C'\fR but \s-1DB::OUT\s0 is temporarily \f(CW\*(C`select\*(C'\fRed as well..IP "= [alias value]" 12.IX Xref "debugger command, =".IX Item "= [alias value]"Define a command alias, like.Sp.Vb 1\&    = quit q.Ve.Spor list current aliases..IP "command" 12.IX Item "command"Execute command as a Perl statement.  A trailing semicolon will besupplied.  If the Perl statement would otherwise be confused for aPerl debugger, use a leading semicolon, too..IP "m expr" 12.IX Xref "debugger command, m".IX Item "m expr"List which methods may be called on the result of the evaluatedexpression.  The expression may evaluated to a reference to ablessed object, or to a package name..IP "M" 12.IX Xref "debugger command, M".IX Item "M"Displays all loaded modules and their versions.IP "man [manpage]" 12.IX Xref "debugger command, man".IX Item "man [manpage]"Despite its name, this calls your system's default documentationviewer on the given page, or on the viewer itself if \fImanpage\fR isomitted.  If that viewer is \fBman\fR, the current \f(CW\*(C`Config\*(C'\fR informationis used to invoke \fBman\fR using the proper \s-1MANPATH\s0 or \fB\-M\fR\ \fImanpath\fR option.  Failed lookups of the form \f(CW\*(C`XXX\*(C'\fR that matchknown manpages of the form \fIperlXXX\fR will be retried.  This letsyou type \f(CW\*(C`man debug\*(C'\fR or \f(CW\*(C`man op\*(C'\fR from the debugger..SpOn systems traditionally bereft of a usable \fBman\fR command, thedebugger invokes \fBperldoc\fR.  Occasionally this determination isincorrect due to recalcitrant vendors or rather more felicitously,to enterprising users.  If you fall into either category, justmanually set the \f(CW$DB::doccmd\fR variable to whatever viewer to viewthe Perl documentation on your system.  This may be set in an rcfile, or through direct assignment.  We're still waiting for aworking example of something along the lines of:.Sp.Vb 1\&    $DB::doccmd = \*(Aqnetscape \-remote http://something.here/\*(Aq;.Ve.Sh "Configurable Options".IX Subsection "Configurable Options"The debugger has numerous options settable using the \f(CW\*(C`o\*(C'\fR command,either interactively or from the environment or an rc file.(./.perldb or ~/.perldb under Unix.).ie n .IP """recallCommand""\fR, \f(CW""ShellBang""" 12.el .IP "\f(CWrecallCommand\fR, \f(CWShellBang\fR" 12.IX Xref "debugger option, recallCommand debugger option, ShellBang".IX Item "recallCommand, ShellBang"The characters used to recall command or spawn shell.  Bydefault, both are set to \f(CW\*(C`!\*(C'\fR, which is unfortunate..ie n .IP """pager""" 12.el .IP "\f(CWpager\fR" 12.IX Xref "debugger option, pager".IX Item "pager"Program to use for output of pager-piped commands (those beginningwith a \f(CW\*(C`|\*(C'\fR character.)  By default, \f(CW$ENV{PAGER}\fR will be used.Because the debugger uses your current terminal characteristicsfor bold and underlining, if the chosen pager does not pass escapesequences through unchanged, the output of some debugger commandswill not be readable when sent through the pager..ie n .IP """tkRunning""" 12.el .IP "\f(CWtkRunning\fR" 12.IX Xref "debugger option, tkRunning".IX Item "tkRunning"Run Tk while prompting (with ReadLine)..ie n .IP """signalLevel""\fR, \f(CW""warnLevel""\fR, \f(CW""dieLevel""" 12.el .IP "\f(CWsignalLevel\fR, \f(CWwarnLevel\fR, \f(CWdieLevel\fR" 12.IX Xref "debugger option, signalLevel debugger option, warnLevel debugger option, dieLevel".IX Item "signalLevel, warnLevel, dieLevel"Level of verbosity.  By default, the debugger leaves your exceptionsand warnings alone, because altering them can break correctly runningprograms.  It will attempt to print a message when uncaught \s-1INT\s0, \s-1BUS\s0, or\&\s-1SEGV\s0 signals arrive.  (But see the mention of signals in \s-1BUGS\s0 below.).SpTo disable this default safe mode, set these values to something higherthan 0.  At a level of 1, you get backtraces upon receiving any kindof warning (this is often annoying) or exception (this isoften valuable).  Unfortunately, the debugger cannot discern fatalexceptions from non-fatal ones.  If \f(CW\*(C`dieLevel\*(C'\fR is even 1, then yournon-fatal exceptions are also traced and unceremoniously altered if theycame from \f(CW\*(C`eval\*(Aqed\*(C'\fR strings or from any kind of \f(CW\*(C`eval\*(C'\fR within modulesyou're attempting to load.  If \f(CW\*(C`dieLevel\*(C'\fR is 2, the debugger doesn'tcare where they came from:  It usurps your exception handler and printsout a trace, then modifies all exceptions with its own embellishments.This may perhaps be useful for some tracing purposes, but tends to hopelesslydestroy any program that takes its exception handling seriously..ie n .IP """AutoTrace""" 12.el .IP "\f(CWAutoTrace\fR" 12.IX Xref "debugger option, AutoTrace".IX Item "AutoTrace"Trace mode (similar to \f(CW\*(C`t\*(C'\fR command, but can be put into\&\f(CW\*(C`PERLDB_OPTS\*(C'\fR)..ie n .IP """LineInfo""" 12.el .IP "\f(CWLineInfo\fR" 12.IX Xref "debugger option, LineInfo".IX Item "LineInfo"File or pipe to print line number info to.  If it is a pipe (say,\&\f(CW\*(C`|visual_perl_db\*(C'\fR), then a short message is used.  This is themechanism used to interact with a slave editor or visual debugger,such as the special \f(CW\*(C`vi\*(C'\fR or \f(CW\*(C`emacs\*(C'\fR hooks, or the \f(CW\*(C`ddd\*(C'\fR graphicaldebugger..ie n .IP """inhibit_exit""" 12.el .IP "\f(CWinhibit_exit\fR" 12.IX Xref "debugger option, inhibit_exit".IX Item "inhibit_exit"If 0, allows \fIstepping off\fR the end of the script..ie n .IP """PrintRet""" 12.el .IP "\f(CWPrintRet\fR" 12.IX Xref "debugger option, PrintRet".IX Item "PrintRet"Print return value after \f(CW\*(C`r\*(C'\fR command if set (default)..ie n .IP """ornaments""" 12.el .IP "\f(CWornaments\fR" 12.IX Xref "debugger option, ornaments".IX Item "ornaments"Affects screen appearance of the command line (see Term::ReadLine).There is currently no way to disable these, which can rendersome output illegible on some displays, or with some pagers.This is considered a bug..ie n .IP """frame""" 12.el .IP "\f(CWframe\fR" 12.IX Xref "debugger option, frame".IX Item "frame"Affects the printing of messages upon entry and exit from subroutines.  If\&\f(CW\*(C`frame & 2\*(C'\fR is false, messages are printed on entry only. (Printingon exit might be useful if interspersed with other messages.).SpIf \f(CW\*(C`frame & 4\*(C'\fR, arguments to functions are printed, plus contextand caller info.  If \f(CW\*(C`frame & 8\*(C'\fR, overloaded \f(CW\*(C`stringify\*(C'\fR and\&\f(CW\*(C`tie\*(C'\fRd \f(CW\*(C`FETCH\*(C'\fR is enabled on the printed arguments.  If \f(CW\*(C`frame& 16\*(C'\fR, the return value from the subroutine is printed..SpThe length at which the argument list is truncated is governed by thenext option:.ie n .IP """maxTraceLen""" 12.el .IP "\f(CWmaxTraceLen\fR" 12.IX Xref "debugger option, maxTraceLen".IX Item "maxTraceLen"Length to truncate the argument list when the \f(CW\*(C`frame\*(C'\fR option'sbit 4 is set..ie n .IP """windowSize""" 12.el .IP "\f(CWwindowSize\fR" 12.IX Xref "debugger option, windowSize".IX Item "windowSize"Change the size of code list window (default is 10 lines)..PPThe following options affect what happens with \f(CW\*(C`V\*(C'\fR, \f(CW\*(C`X\*(C'\fR, and \f(CW\*(C`x\*(C'\fRcommands:.ie n .IP """arrayDepth""\fR, \f(CW""hashDepth""" 12.el .IP "\f(CWarrayDepth\fR, \f(CWhashDepth\fR" 12.IX Xref "debugger option, arrayDepth debugger option, hashDepth".IX Item "arrayDepth, hashDepth"Print only first N elements ('' for all)..ie n .IP """dumpDepth""" 12.el .IP "\f(CWdumpDepth\fR" 12.IX Xref "debugger option, dumpDepth".IX Item "dumpDepth"Limit recursion depth to N levels when dumping structures.Negative values are interpreted as infinity.  Default: infinity..ie n .IP """compactDump""\fR, \f(CW""veryCompact""" 12.el .IP "\f(CWcompactDump\fR, \f(CWveryCompact\fR" 12.IX Xref "debugger option, compactDump debugger option, veryCompact".IX Item "compactDump, veryCompact"Change the style of array and hash output.  If \f(CW\*(C`compactDump\*(C'\fR, short arraymay be printed on one line..ie n .IP """globPrint""" 12.el .IP "\f(CWglobPrint\fR" 12.IX Xref "debugger option, globPrint".IX Item "globPrint"Whether to print contents of globs..ie n .IP """DumpDBFiles""" 12.el .IP "\f(CWDumpDBFiles\fR" 12.IX Xref "debugger option, DumpDBFiles".IX Item "DumpDBFiles"Dump arrays holding debugged files..ie n .IP """DumpPackages""" 12.el .IP "\f(CWDumpPackages\fR" 12.IX Xref "debugger option, DumpPackages".IX Item "DumpPackages"Dump symbol tables of packages..ie n .IP """DumpReused""" 12.el .IP "\f(CWDumpReused\fR" 12.IX Xref "debugger option, DumpReused".IX Item "DumpReused"Dump contents of \*(L"reused\*(R" addresses..ie n .IP """quote""\fR, \f(CW""HighBit""\fR, \f(CW""undefPrint""" 12.el .IP "\f(CWquote\fR, \f(CWHighBit\fR, \f(CWundefPrint\fR" 12.IX Xref "debugger option, quote debugger option, HighBit debugger option, undefPrint".IX Item "quote, HighBit, undefPrint"Change the style of string dump.  The default value for \f(CW\*(C`quote\*(C'\fRis \f(CW\*(C`auto\*(C'\fR; one can enable double-quotish or single-quotish formatby setting it to \f(CW\*(C`"\*(C'\fR or \f(CW\*(C`\*(Aq\*(C'\fR, respectively.  By default, characterswith their high bit set are printed verbatim..ie n .IP """UsageOnly""" 12.el .IP "\f(CWUsageOnly\fR" 12.IX Xref "debugger option, UsageOnly".IX Item "UsageOnly"Rudimentary per-package memory usage dump.  Calculates totalsize of strings found in variables in the package.  This does notinclude lexicals in a module's file scope, or lost in closures..PPAfter the rc file is read, the debugger reads the \f(CW$ENV{PERLDB_OPTS}\fRenvironment variable and parses this as the remainder of a \*(L"O ...\*(R"line as one might enter at the debugger prompt.  You may place theinitialization options \f(CW\*(C`TTY\*(C'\fR, \f(CW\*(C`noTTY\*(C'\fR, \f(CW\*(C`ReadLine\*(C'\fR, and \f(CW\*(C`NonStop\*(C'\fRthere..PPIf your rc file contains:.PP.Vb 1\&  parse_options("NonStop=1 LineInfo=db.out AutoTrace");.Ve.PPthen your script will run without human intervention, putting traceinformation into the file \fIdb.out\fR.  (If you interrupt it, you'dbetter reset \f(CW\*(C`LineInfo\*(C'\fR to \fI/dev/tty\fR if you expect to see anything.).ie n .IP """TTY""" 12.el .IP "\f(CWTTY\fR" 12.IX Xref "debugger option, TTY".IX Item "TTY"The \s-1TTY\s0 to use for debugging I/O..ie n .IP """noTTY""" 12.el .IP "\f(CWnoTTY\fR" 12.IX Xref "debugger option, noTTY".IX Item "noTTY"If set, the debugger goes into \f(CW\*(C`NonStop\*(C'\fR mode and will not connect to a \s-1TTY\s0.  Ifinterrupted (or if control goes to the debugger via explicit setting of\&\f(CW$DB::signal\fR or \f(CW$DB::single\fR from the Perl script), it connects to a \s-1TTY\s0specified in the \f(CW\*(C`TTY\*(C'\fR option at startup, or to a tty found atruntime using the \f(CW\*(C`Term::Rendezvous\*(C'\fR module of your choice..SpThis module should implement a method named \f(CW\*(C`new\*(C'\fR that returns an objectwith two methods: \f(CW\*(C`IN\*(C'\fR and \f(CW\*(C`OUT\*(C'\fR.  These should return filehandles to usefor debugging input and output correspondingly.  The \f(CW\*(C`new\*(C'\fR method shouldinspect an argument containing the value of \f(CW$ENV{PERLDB_NOTTY}\fR atstartup, or \f(CW"$ENV{HOME}/.perldbtty$$"\fR otherwise.  This file is notinspected for proper ownership, so security hazards are theoreticallypossible..ie n .IP """ReadLine""" 12.el .IP "\f(CWReadLine\fR" 12.IX Xref "debugger option, ReadLine".IX Item "ReadLine"If false, readline support in the debugger is disabled in orderto debug applications that themselves use ReadLine..ie n .IP """NonStop""" 12.el .IP "\f(CWNonStop\fR" 12.IX Xref "debugger option, NonStop".IX Item "NonStop"If set, the debugger goes into non-interactive mode until interrupted, orprogrammatically by setting \f(CW$DB::signal\fR or \f(CW$DB::single\fR..PPHere's an example of using the \f(CW$ENV{PERLDB_OPTS}\fR variable:.PP.Vb 1\&    $ PERLDB_OPTS="NonStop frame=2" perl \-d myprogram.Ve.PPThat will run the script \fBmyprogram\fR without human intervention,printing out the call tree with entry and exit points.  Note that\&\f(CW\*(C`NonStop=1 frame=2\*(C'\fR is equivalent to \f(CW\*(C`N f=2\*(C'\fR, and that originally,options could be uniquely abbreviated by the first letter (modulothe \f(CW\*(C`Dump*\*(C'\fR options).  It is nevertheless recommended that youalways spell them out in full for legibility and future compatibility..PPOther examples include.PP.Vb 1\&    $ PERLDB_OPTS="NonStop LineInfo=listing frame=2" perl \-d myprogram.Ve.PPwhich runs script non-interactively, printing info on each entryinto a subroutine and each executed line into the file named \fIlisting\fR.(If you interrupt it, you would better reset \f(CW\*(C`LineInfo\*(C'\fR to something\&\*(L"interactive\*(R"!).PPOther examples include (using standard shell syntax to show environmentvariable settings):.PP.Vb 2\&  $ ( PERLDB_OPTS="NonStop frame=1 AutoTrace LineInfo=tperl.out"\&      perl \-d myprogram ).Ve.PPwhich may be useful for debugging a program that uses \f(CW\*(C`Term::ReadLine\*(C'\fRitself.  Do not forget to detach your shell from the \s-1TTY\s0 in the window thatcorresponds to \fI/dev/ttyXX\fR, say, by issuing a command like.PP.Vb 1\&  $ sleep 1000000.Ve.PP

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -