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

📄 brkpt2.right

📁 bash debugger. You can use this tool to debug bash shell script
💻 RIGHT
字号:
(dbg-test1.sh:22):22:	x=22+# Test break, watch, watche, step, next, continue and stack handling+# +### Try a simple line number breakpoint...+break 23Breakpoint 1 set in file dbg-test1.sh, line 23.+info breakNum Type       Disp Enb What1   breakpoint keep y   dbg-test1.sh:23No watch expressions have been set.+continue Breakpoint 1 hit (1 times).(dbg-test1.sh:23):23:	y=23+info programProgram stopped.It stopped at breakpoint 1.+# +### Try watch...+watch x 0: ($x)==22 arith: 0+info watchpointsNum Type       Disp Enb What1   breakpoint keep y   dbg-test1.sh:23	breakpoint already hit 1 timeNum Type       Enb  Expression0   watchpoint y    $x+c Watchpoint 1: $x changed:  old value: '22'  new value: '23'(dbg-test1.sh:24):24:	for i in 0 1 3 ; do+info programProgram stopped.+### Try disable expression...+disable 1wWatchpoint entry 0 disabled.+watche x > 26 1: (x > 26)==0 arith: 1+info breakNum Type       Disp Enb What1   breakpoint keep y   dbg-test1.sh:23	breakpoint already hit 1 timeNum Type       Enb  Expression0   watchpoint n    $x	breakpoint already hit 1 time1   watchpoint y    x > 26+### Continuing with a one-time line break (but will watch expression)...+cont 30One-time breakpoint 2 set in file dbg-test1.sh, line 30.Watchpoint 3: x > 26 changed:  old value: '0'  new value: '1'(dbg-test1.sh:28):28:	y=b+L Num Type       Disp Enb What1   breakpoint keep y   dbg-test1.sh:23	breakpoint already hit 1 time2   breakpoint del  y   dbg-test1.sh:30Num Type       Enb  Expression0   watchpoint n    $x	breakpoint already hit 1 time1   watchpoint y    x > 26	breakpoint already hit 1 timeNo actions have been set.+### Try deleting a watchpoint...+delete 1W+L Num Type       Disp Enb What1   breakpoint keep y   dbg-test1.sh:23	breakpoint already hit 1 time2   breakpoint del  y   dbg-test1.sh:30Num Type       Enb  Expression0   watchpoint n    $x	breakpoint already hit 1 timeNo actions have been set.+### Try break with a function...+break fn1Breakpoint 3 set in file dbg-test1.sh, line 5.+### Stepping 2...+step 2(dbg-test1.sh:30):30:	echo $(fn3 30)+### Try continue with a line number...+cont 34One-time breakpoint 4 set in file dbg-test1.sh, line 34.Breakpoint 3 hit (1 times).(dbg-test1.sh:5):5:	fn1() {+info programProgram stopped.It stopped at breakpoint 3.+L Num Type       Disp Enb What1   breakpoint keep y   dbg-test1.sh:23	breakpoint already hit 1 time3   breakpoint keep y   dbg-test1.sh:5	breakpoint already hit 1 time4   breakpoint del  y   dbg-test1.sh:34Num Type       Enb  Expression0   watchpoint n    $x	breakpoint already hit 1 timeNo actions have been set.+### List stack frame...+where ->0 in file `dbg-test1.sh' at line 5##1 fn1() called from file `dbg-test1.sh' at line 32##2 source("dbg-test1.sh") called from file `bashdb' at line 277##3 main() called from file `bashdb' at line 0+### Try up...+up (dbg-test1.sh:32):32:	fn1;+list  32:   fn1; 33:   fn3 33 34:   source dbg-test1.sub 35:   exit 0; 36:   #;;; Local Variables: *** 37:   #;;; mode:shell-script *** 38:   #;;; End: ***+### Try down 1...+down 1(dbg-test1.sh:5):5:	fn1() {+list   5:==>fn1() {  6:       echo "fn1 here"  7:       x=5  8:       fn3  9:   }     10:    11:   fn2() { 12:       name="fn2" 13:       echo "$name here" 14:       x=6+### frame 0...+frame 0(dbg-test1.sh:5):5:	fn1() {+### Try step (twice)...+step (dbg-test1.sh:6):6:	    echo "fn1 here"+info programProgram stopped.It stopped after being stepped.+step fn1 here(dbg-test1.sh:7):7:	    x=5+### Try next and check that it jumps over fn3+next (dbg-test1.sh:8):8:	    fn3+### Try continue file:line (but will hit another breakpoint)...+cont ./dbg-test1.sh:35One-time breakpoint 5 set in file dbg-test1.sh, line 35.(dbg-test1.sh:34):34:	source dbg-test1.sub+step 2SOURCED LINENO 19(dbg-test1.sub:20):20:	filename=${BASH_SOURCE[0]##*/}+T ->0 in file `dbg-test1.sub' at line 20##1 source("dbg-test1.sub") called from file `dbg-test1.sh' at line 34##2 source("dbg-test1.sh") called from file `bashdb' at line 277##3 main() called from file `bashdb' at line 0+step 10SOURCED BASH_SOURCE[0] dbg-test1.subSOURCED FN LINENO 5(dbg-test1.sub:11):11:	        local -i j=i+1+T ->0 in file `dbg-test1.sub' at line 11##1 sourced_fn() called from file `dbg-test1.sub' at line 22##2 source("dbg-test1.sub") called from file `dbg-test1.sh' at line 34##3 source("dbg-test1.sh") called from file `bashdb' at line 277##4 main() called from file `bashdb' at line 0+### Try x command...+x jj+### Try continue break no args (here)...+break Breakpoint 6 set in file dbg-test1.sub, line 11.+cont FUNCNAME[0]: sourced_fn called from dbg-test1.sub at line 22Breakpoint 6 hit (1 times).(dbg-test1.sub:11):11:	        local -i j=i+1+### another x command...+x jdeclare -i j="1"+### another x command (+5 than value above) ...+x j+56+### x command of string y+x ydeclare -- y="b"+### x of a function ...+x fn2fn2 () {     name="fn2";    echo "$name here";    x=6}+### Bad x expressions ...+x bogusbogus+x bogus+bogus++x fn2+fn3fn2+fn3+x fn2+33+### another continue. Count on breakpoint should go up.+cont FUNCNAME[1]: source called from dbg-test1.sh at line 34Breakpoint 6 hit (2 times).(dbg-test1.sub:11):11:	        local -i j=i+1+print "j: $j, name: $name"j: 2, name: fn2+### Try disable of break+disable 5Breakpoint entry 5 disabled.+L Num Type       Disp Enb What1   breakpoint keep y   dbg-test1.sh:23	breakpoint already hit 1 time3   breakpoint keep y   dbg-test1.sh:5	breakpoint already hit 1 time5   breakpoint del  n   dbg-test1.sh:356   breakpoint keep y   dbg-test1.sub:11Num Type       Enb  Expression0   watchpoint n    $x	breakpoint already hit 1 timeNo actions have been set.+cont FUNCNAME[2]: source called from bashdb at line 277Breakpoint 6 hit (3 times).(dbg-test1.sub:11):11:	        local -i j=i+1+### Test temporary break and its reporting+cont 13One-time breakpoint 7 set in file dbg-test1.sub, line 13.(dbg-test1.sub:13):13:		local filename=${BASH_SOURCE[$j]##*/}+info programProgram stopped.It stopped at a breakpoint that has since been deleted.+### Should hit end of script but stay in debugger...+cont FUNCNAME[3]: main called from bashdb at line 0Debugged program terminated normally. Use q to quit or R to restart.+info filesSource files for which have been read in:dbg-test1.sh (39 lines)dbg-test1.sub (29 lines)+### quitting...+quit 

⌨️ 快捷键说明

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