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

📄 misc.right

📁 bash debugger. You can use this tool to debug bash shell script
💻 RIGHT
📖 第 1 页 / 共 2 页
字号:
of preserving the free status of all derivatives of our free software andof promoting the sharing and reuse of software generally.+#### help commands...+help bashdb commands:List/search source lines:                 Control script execution:-------------------------                 ------------------------- l [start|.] [cnt] List cnt lines         T [n]        Stack trace                   from line start        s [n]        Single step [n times] l sub       List source code fn          n [n]        Next, steps over subs - or .      List previous/current line   <CR>/<Enter> Repeat last n or s  w [line]    List around line             c [linespec] Continue [to linespec] f filename  View source in file          L            List all breakpoints /pat/       Search forward for pat       b linespec   Set breakpoint ?pat?       Search backward for pat      del [n].. or D Delete a/all breaks                                                         by entry numberDebugger controls:                        skip         skip execution of cmd-------------------------                 cl linespec  Delete breakpoints by H [num]         Show last num commands                line spec q [exp] or ^D   Quit returning exp       R [args]     Attempt a restart info [cmd]      Get info on cmd.         u [n]        Go up stack by n or 1. !n or hi n      Run debugger history n   do [n]       Go down stack by n or 1. h or ? [cmd]    Get help on command      W [var]      Add watchpoint. If no info [cmd]      Get info on cmd                       no expr, delete all show [cmd]      Show settings            We [expr]    Add Watchpoint arith                                                        expr so file         read in dbg commands     t            Toggle trace                                          en/di n      enable/disable brkpt, set x y         set a debugger variable               watchpoint, or display e bash-cmd      evaluate a bash command  tb linespec  Add one-time break disp expr       add a display expr       a linespec cmd eval "cmd" at linespec M               Show module versions     A            delete all actions x expr          evaluate expression      ret          jump out of fn or source                 (via declare, let, eval) finish       execute until return deb             debug into another       cond n exp   set breakpoint condition                 shell script !! cmd [args]   execute shell command "cmd" with "args" file filename   Set script filename to read for current source. load filename   read in Bash source file use in list and break commandsData Examination: also see e, t, x-------------------------                  p variable      Print variable  V [[!]pat]      List variable(s) matching or not (!) matching pattern pat S [[!]pat]      List subroutine names [not] matching pattern patReadline command line editing (emacs/vi mode) is available.For more help, type h <cmd> or consult online-documentation.+help setset args -- Set argument list to give program being debugged when it is started.Follow this command with any number of args, to be passed to the program.set annotate  -- Set annotation level.set basename  -- Set short filenames (the basename) in debug output is on.set debugger  -- Set debugging the debugger is debuggerset editing   -- Set editing of command lines as they are typed is off.set linetrace -- Set tracing execution of lines before executed is off.set listsize  -- Set number of source lines bashdb will list by default.set prompt    -- bashdb's prompt is:       "bashdb${_Dbg_less}${#_Dbg_history[@]}${_Dbg_greater}$_Dbg_space".set showcommand -- Set showing the command to execute is auto.set trace-commands -- Set showing debugger commands is on.+help set fooThere is no "set foo" command.+help set arSet argument list to give program being debugged when it is started.Follow this command with any number of args, to be passed to the program.+help set annotateSet annotation level.0 == normal;     1 == fullname (for use when running under emacs)+help set listsizeSet number of source lines bashdb will list by default.+help set promptbashdb's prompt is:       "bashdb${_Dbg_less}${#_Dbg_history[@]}${_Dbg_greater}$_Dbg_space".+help set editingSet editing of command lines as they are typed is off.+help ttytt  tty-name     Set the output device for debugger output                 Long command name: tty.+help infoList of info subcommands:info args -- Argument variables (e.g. $1, $2, ...) of the current stack frame.info breakpoints -- Status of user-settable breakpointsinfo display -- Show all display expressionsinfo files -- Source files in the programinfo functions -- All function namesinfo line -- list current line number and and file nameinfo program -- Execution status of the program.info signals -- What debugger does when program gets various signalsinfo source -- Information about the current source fileinfo stack -- Backtrace of the stackinfo terminal -- Print terminal deviceinfo variables -- All global and static variable namesinfo warranty -- Various kinds of warranty you do not have+info Info subcommands are: args breakpoints display files functions program source sources stack terminal variables watchpoints+show args:     Argument list to give script when debugged program starts is:       "-B -q -L .. -x misc.cmd dbg-test2.sh testarg1 testarg2".basename: Show short filenames (the basename) in debug output is on.debugger: Allow debugging the debugger is off.editing:  Editing of command lines as they are typed is on.line tracing: Show line tracing is off.line tracing: Show line trace delay is 0.listsize: Number of source lines bashdb will list by default is 10.prompt:   bashdb's prompt is:       "bashdb${_Dbg_less}${#_Dbg_history[@]}${_Dbg_greater}$_Dbg_space".trace-commands: State of command tracing is on.+#### and show...+show argsArgument list to give script when debugged program starts is:       "-B -q -L .. -x misc.cmd dbg-test2.sh testarg1 testarg2".+set args now is the time+show argsArgument list to give script when debugged program starts is:       "now is the time".+set editing off+set editing fooo"on" or "off" expected.+show editingEditing of command lines as they are typed is off.+set editing+show editingEditing of command lines as they are typed is on.+set misspelled 40Undefined set command "misspelled"+set listsize 40+set listsize badInteger argument expected; got: bad+set annotate badInteger argument expected; got: bad+set annotate 6annotation level must be 0 or 1+show annotateAnnotation_level is 0.+set annotate 1+show listsizeNumber of source lines bashdb will list by default is 40.+show annotateAnnotation_level is 1.+######################### +#### Test 'show commands'...+show commands49: show commands48: show annotate47: show listsize46: set annotate 145: show annotate44: set annotate 643: set annotate bad42: set listsize bad41: set listsize 4040: set misspelled 4039: show editing+show commands +38: set editing37: show editing36: set editing fooo35: set editing off34: show args33: set args now is the time32: show args31: show 30: info 29: help info28: help tty+show commands -551: show commands -550: show commands +49: show commands48: show annotate47: show listsize+show commands 1212: print "\$1: $1"11: print "_Dbg_arg#: ${#_Dbg_arg[@]}"10: print "prof1.cmd called"9: set trace-commands on8: source prof1.cmd7: print calling prof1.cmd...6: print prof2.cmd called...5: set trace-commands on4: source prof2.cmd3: print "prof1.cmd called"2: set trace-commands on+#### history...+H 52: show commands 1251: show commands -550: show commands +49: show commands48: show annotate47: show listsize46: set annotate 145: show annotate44: set annotate 643: set annotate bad42: set listsize bad41: set listsize 4040: set misspelled 4039: show editing38: set editing37: show editing36: set editing fooo35: set editing off34: show args33: set args now is the time32: show args31: show 30: info 29: help info28: help tty27: help set editing26: help set prompt25: help set listsize24: help set annotate23: help set ar22: help set foo21: help set20: help 19: show copying18: info warranty17: show warranty16: tty 15: show badcommand14: info args13: print "\$2: $2"12: print "\$1: $1"11: print "_Dbg_arg#: ${#_Dbg_arg[@]}"10: print "prof1.cmd called"9: set trace-commands on8: source prof1.cmd7: print calling prof1.cmd...6: print prof2.cmd called...5: set trace-commands on4: source prof2.cmd3: print "prof1.cmd called"2: set trace-commands on1: source prof1.cmd0: set trace-commands on+H 55: set trace-commands on4: source prof2.cmd3: print "prof1.cmd called"2: set trace-commands on1: source prof1.cmd0: set trace-commands on+H 5 35: set trace-commands on4: source prof2.cmd3: print "prof1.cmd called"+hi 11_Dbg_arg#: 2+!11 _Dbg_arg#: 2+!19:p 19: show copying+!-3:p 50: show commands ++!-2 52: show commands 1251: show commands -550: show commands +49: show commands48: show annotate+! 2+H -252: show commands 1251: show commands -5+H fooInvalid history number: foo+H 10000052: show commands 1251: show commands -550: show commands +49: show commands48: show annotate47: show listsize46: set annotate 145: show annotate44: set annotate 643: set annotate bad42: set listsize bad41: set listsize 4040: set misspelled 4039: show editing38: set editing37: show editing36: set editing fooo35: set editing off34: show args33: set args now is the time32: show args31: show 30: info 29: help info28: help tty27: help set editing26: help set prompt25: help set listsize24: help set annotate23: help set ar22: help set foo21: help set20: help 19: show copying18: info warranty17: show warranty16: tty 15: show badcommand14: info args13: print "\$2: $2"12: print "\$1: $1"11: print "_Dbg_arg#: ${#_Dbg_arg[@]}"10: print "prof1.cmd called"9: set trace-commands on8: source prof1.cmd7: print calling prof1.cmd...6: print prof2.cmd called...5: set trace-commands on4: source prof2.cmd3: print "prof1.cmd called"2: set trace-commands on1: source prof1.cmd0: set trace-commands on+history -252: show commands 1251: show commands -550: show commands +49: show commands48: show annotate+history 10000Number 10000 should be less than 53+#### pwd/cd commands...+pwd Working directory test.+cd .Working directory test.+########################## +#### Test 'prompt' and 'tty' ...+set prompt bashdb${_Dbg_greater}$_Dbg_hi${_Dbg_less}$_Dbg_space+show promptbashdb's prompt is:       "bashdb${_Dbg_greater}$_Dbg_hi${_Dbg_less}$_Dbg_space".+tty /tmp/misc-output.check

⌨️ 快捷键说明

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