📄 dbg-help.inc
字号:
tt | tty ) _Dbg_msg \"tt tty-name Set the output device for debugger output Long command name: tty." return ;; u | up ) _Dbg_msg \"u | up [count] Set file location for printing up the call stack by count. If count is omitted use 1." return ;; v | ve | ver | vers | versi | versio | version ) _Dbg_msg \"M | version Show release version-control IDs of debugger scripts." return ;; w | window ) _Dbg_msg \"w [linespec] List window around line or current linespec. Long command name: window." return ;; x | examine ) _Dbg_msg \"x expr Print value of an expression via \'declare', \`let' and then failing these eval. Single variables and arithmetic expression do not need leading $ for their value is to be substituted. However if neither these, variables need $ to have their value substituted. Long command name: examine" return ;; V ) _Dbg_msg \"V [!][pat] List variables and values for whose variables names which match pat. If ! is used, list variables that *don't* match. If pat is omitted, use * (everything) for the pattern." return ;; We | watche ) _Dbg_msg \"We [arith] Add watchpoint for expression expr. If no expression is given all watchpoints are deleted. Long command name: watche." return ;; W | wa | wat | watch ) _Dbg_msg \"W [var] Add watchpoint for variable var. If no expression is given all watchpoints are deleted. Long command name: watch." return ;; * ) _Dbg_msg "Undefined command: \"$db_cmd\". Try \"help\"." return ;; esac fi _Dbg_msg '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.'}_Dbg_help_set() { local -r set_cmd=$1 local label=$2 if [[ -z $set_cmd ]] ; then local thing for thing in $_Dbg_set_cmds ; do _Dbg_help_set $thing 1 done return fi case $set_cmd in ar | arg | args ) [[ -n $label ]] && label='set args -- ' _Dbg_msg \"${label}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." return 0 ;; an | ann | anno | annot | annota | annotat | annotate ) if [[ -n $label ]] ; then label='set annotate -- ' else local post_label='0 == normal; 1 == fullname (for use when running under emacs)' fi _Dbg_msg \"${label}Set annotation level.$post_label" return 0 ;; b | ba | bas | base | basen | basena | basenam | basename ) [[ -n $label ]] && label='set basename -- ' local onoff="off." (( $_Dbg_basename_only != 0 )) && onoff='on.' _Dbg_msg \"${label}Set short filenames (the basename) in debug output is" $onoff return 0 ;; d|de|deb|debu|debug|debugg|debugger|debuggi|debuggin|debugging ) local onoff=${1:-'on'} [[ -n $label ]] && label='set debugger -- ' (( $_Dbg_debug_debugger )) && onoff='on.' _Dbg_msg \"${label}Set debugging the debugger is" $onoff return 0 ;; e | ed | edi | edit | editi | editin | editing ) [[ -n $label ]] && label='set editing -- ' local onoff="off." (( $_Dbg_edit )) && onoff='on.' _Dbg_msg \"${label}Set editing of command lines as they are typed is" $onoff ;; lin | line | linet | linetr | linetra | linetrac | linetrace ) [[ -n $label ]] && label='set linetrace -- ' local onoff='off.' (( $_Dbg_linetrace )) && onoff='on.' _Dbg_msg \"${label}Set tracing execution of lines before executed is" $onoff if (( $_Dbg_linetrace )) ; then _Dbg_msg \"set linetrace delay -- delay before executing a line is" $_Dbg_linetrace_delay fi return 0 ;; lis | list | lists | listsi | listsiz | listsize ) [[ -n $label ]] && label='set listsize -- ' _Dbg_msg \"${label}Set number of source lines bashdb will list by default." ;; p | pr | pro | prom | promp | prompt ) [[ -n $label ]] && label='set prompt -- ' _Dbg_msg \"${label}bashdb's prompt is:\n" \" \"$_Dbg_prompt_str\"." return 0 ;; sho|show|showc|showco|showcom|showcomm|showcomma|showcomman|showcommand ) [[ -n $label ]] && label='set showcommand -- ' _Dbg_msg \"${label}Set showing the command to execute is $_Dbg_show_command." return 0 ;; t|tr|tra|trac|trace|trace-|tracec|trace-co|trace-com|trace-comm|trace-comma|trace-comman|trace-command|trace-commands ) [[ -n $label ]] && label='set trace-commands -- ' _Dbg_msg \"${label}Set showing debugger commands is $_Dbg_trace_commands." return 0 ;; * ) _Dbg_msg \"There is no \"set $set_cmd\" command." esac}_Dbg_help_show() { local -r show_cmd=$1 if [[ -z $show_cmd ]] ; then local thing for thing in $_Dbg_show_cmds ; do _Dbg_help_show $thing 1 done return fi case $show_cmd in ar | arg | args ) _Dbg_msg \"show args -- Show argument list to give program being debugged when it is started" return 0 ;; an | ann | anno | annot | annota | annotat | annotate ) _Dbg_msg \"show annotate -- Show annotation_level" return 0 ;; b | ba | bas | base | basen | basena | basenam | basename ) _Dbg_msg \"show basename -- Show if we are are to show short or long filenames" return 0 ;; com | comm | comma | comman | command | commands ) _Dbg_msg \"show commands [+|n] -- Show the history of commands you typed.You can supply a command number to start with, or a + to start afterthe previous command number shown. A negative number indicates the number of lines to list." ;; cop | copy| copyi | copyin | copying ) _Dbg_msg \"show copying -- Conditions for redistributing copies of debugger" ;; d|de|deb|debu|debug|debugg|debugger|debuggi|debuggin|debugging ) _Dbg_msg \"show debugger -- Show if we are set to debug the debugger" return 0 ;; di|dir|dire|direc|direct|directo|director|directori|directorie|directories) _Dbg_msg \"show directories -- Show if we are set to debug the debugger" ;; lin | line | linet | linetr | linetra | linetrac | linetrace ) _Dbg_msg \"show linetrace -- Show whether to trace lines before execution" ;; lis | list | lists | listsi | listsiz | listsize ) _Dbg_msg \"show listsize -- Show number of source lines debugger will list by default" ;; p | pr | pro | prom | promp | prompt ) _Dbg_msg \"show prompt -- Show debugger's prompt" return 0 ;; t|tr|tra|trac|trace|trace-|trace-c|trace-co|trace-com|trace-comm|trace-comma|trace-comman|trace-command|trace-commands ) _Dbg_msg \"show trace-commands -- Show if we are echoing debugger commands" return 0 ;; w | wa | war | warr | warra | warran | warrant | warranty ) _Dbg_msg \"show warranty -- Various kinds of warranty you do not have" return 0 ;; * ) _Dbg_msg \ "Undefined show command: \"$show_cmd\". Try \"help show\"." esac}# This is put at the so we have something at the end to stop at # when we debug this. By stopping at the end all of the above functions# and variables can be tested.typeset -r _Dbg_help_ver=\'$Id: dbg-help.inc,v 1.14 2007/03/03 05:02:30 rockyb Exp $'#;;; Local Variables: ***#;;; mode:shell-script ***#;;; End: ***
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -