vscode-bash-debug
vscode-bash-debug copied to clipboard
Wrong variable watch result if variable is in date string
In addition to the details for issue, please provide us Executables information and Debug output unless you have confidence that they don't help us.
Executables
Version of bash-debug: (can be checked in: ctrl+shift+X or command+shift+X -> INSTALLED: Bash Debug) v0.3.9
where bash
gives nothing at all.
Version: 1.63.2 (system setup) Commit: 899d46d82c4c95423fb7e10e68eba52050e30ba3 Date: 2021-12-15T09:40:02.816Z Electron: 13.5.2 Chromium: 91.0.4472.164 Node.js: 14.16.0 V8: 9.1.269.39-electron.0 OS: Windows_NT x64 10.0.19044
Linux catnip 5.10.60.1-microsoft-standard-WSL2 #1 SMP Wed Aug 25 23:20:18 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux
---
/usr/bin/bash
/bin/bash
GNU bash, version 5.0.17(1)-release (x86_64-pc-linux-gnu)
Copyright (C) 2019 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software; you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
---
bashdb: command not found
---
/usr/bin/cat
/bin/cat
cat (GNU coreutils) 8.30
Copyright (C) 2018 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <https://gnu.org/licenses/gpl.html>.
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Written by Torbjorn Granlund and Richard M. Stallman.
---
/usr/bin/mkfifo
/bin/mkfifo
mkfifo (GNU coreutils) 8.30
Copyright (C) 2018 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <https://gnu.org/licenses/gpl.html>.
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Written by David MacKenzie.
---
/usr/bin/pkill
/bin/pkill
pkill from procps-ng 3.3.16
Debug output
To client: {"seq":0,"type":"response","request_seq":1,"command":"initialize","success":true,"body":{"supportsConditionalBreakpoints":true,"supportsConfigurationDoneRequest":false,"supportsEvaluateForHovers":true,"supportsStepBack":false,"supportsSetVariable":false}}
From client: launch({"type":"bashdb","request":"launch","name":"Bash-Debug (simplest configuration)","program":"d:\\myplace\\scripts\\ParseTrainAddtoGcal\\test.sh","cwd":"d:\\myplace\\scripts\\ParseTrainAddtoGcal","terminalKind":"integrated","showDebugOutput":true,"trace":true,"__configurationTarget":5,"args":[],"argsString":"","env":{},"pathBash":"bash","pathBashdb":"/mnt/c/Users/Han/.vscode/extensions/rogalmic.bash-debug-0.3.9/bashdb_dir/bashdb","pathBashdbLib":"/mnt/c/Users/Han/.vscode/extensions/rogalmic.bash-debug-0.3.9/bashdb_dir","pathCat":"cat","pathMkfifo":"mkfifo","pathPkill":"pkill","__sessionId":"ede867b7-dbc2-46df-95df-bb1d8978b2ff"})
To client: "runInTerminal"({"kind":"integrated","title":"Bash Debug Console","cwd":".","args":["wsl.exe","bash","-c","cd \"/mnt/d/myplace/scripts/ParseTrainAddtoGcal\"; while [[ ! -p \"/tmp/vscode-bash-debug-fifo-14686\" ]]; do sleep 0.25; done; \"bash\" \"/mnt/c/Users/Han/.vscode/extensions/rogalmic.bash-debug-0.3.9/bashdb_dir/bashdb\" --quiet --tty \"/tmp/vscode-bash-debug-fifo-14686\" --tty_in \"/tmp/vscode-bash-debug-fifo-14686_in\" --library \"/mnt/c/Users/Han/.vscode/extensions/rogalmic.bash-debug-0.3.9/bashdb_dir\" -- \"/mnt/d/myplace/scripts/ParseTrainAddtoGcal/test.sh\" "]}), timeout: 10000
To client: {"seq":0,"type":"event","event":"output","body":{"category":"stderr","output":"::PROXYID::18754\n"}}
::PROXYID::18754
To client: {"seq":0,"type":"event","event":"output","body":{"category":"stdout","output":"(/mnt/d/myplace/scripts/ParseTrainAddtoGcal/test.sh:1):\n1:\ttest='2022-1-17'\n"}}
(/mnt/d/myplace/scripts/ParseTrainAddtoGcal/test.sh:1):
1: test='2022-1-17'
To client: {"seq":0,"type":"event","event":"output","body":{"category":"telemetry","output":"Sending StoppedEvent"}}
To client: {"seq":0,"type":"event","event":"stopped","body":{"reason":"break","threadId":42}}
From client: threads(undefined)
To client: {"seq":0,"type":"response","request_seq":4,"command":"threads","success":true,"body":{"threads":[{"id":42,"name":"Bash thread"}]}}
From client: stackTrace({"threadId":42,"startFrame":0,"levels":20})
To client: {"seq":0,"type":"event","event":"output","body":{"category":"stdout","output":"Debug environment: bash_ver=5.0.17(1)-release, bashdb_ver=4.4-0.94-mod, program=/mnt/d/myplace/scripts/ParseTrainAddtoGcal/test.sh, args=\n"}}
Debug environment: bash_ver=5.0.17(1)-release, bashdb_ver=4.4-0.94-mod, program=/mnt/d/myplace/scripts/ParseTrainAddtoGcal/test.sh, args=
To client: {"seq":0,"type":"event","event":"output","body":{"category":"stdout","output":"18762\n"}}
18762
To client: {"seq":0,"type":"event","event":"output","body":{"category":"stdout","output":"############################################################\n"}}
############################################################
To client: {"seq":0,"type":"response","request_seq":2,"command":"launch","success":true}
To client: {"seq":0,"type":"event","event":"output","body":{"category":"telemetry","output":"Sending InitializedEvent"}}
To client: {"seq":0,"type":"event","event":"initialized"}
To client: {"seq":0,"type":"event","event":"output","body":{"category":"stdout","output":"backtrace\n"}}
backtrace
To client: {"seq":0,"type":"event","event":"output","body":{"category":"stdout","output":"->0 in file `/mnt/d/myplace/scripts/ParseTrainAddtoGcal/test.sh' at line 1\n"}}
->0 in file `/mnt/d/myplace/scripts/ParseTrainAddtoGcal/test.sh' at line 1
From client: setBreakpoints({"source":{"name":"ParseTrainAddtoGcal.sh","path":"d:\\myplace\\scripts\\ParseTrainAddtoGcal\\ParseTrainAddtoGcal.sh"},"lines":[28,92,96],"breakpoints":[{"line":28},{"line":92},{"line":96}],"sourceModified":false})
To client: {"seq":0,"type":"event","event":"output","body":{"category":"stdout","output":"##1 source"}}
##1 sourceTo client: {"seq":0,"type":"event","event":"output","body":{"category":"stdout","output":"(\"/mnt/d/myplace/scripts/ParseTrainAddtoGcal/test.sh\") called from file `/mnt/c/Users/Han/.vscode/extensions/rogalmic.bash-debug-0.3.9/bashdb_dir/bashdb' at line 102\n"}}
("/mnt/d/myplace/scripts/ParseTrainAddtoGcal/test.sh") called from file `/mnt/c/Users/Han/.vscode/extensions/rogalmic.bash-debug-0.3.9/bashdb_dir/bashdb' at line 102
To client: {"seq":0,"type":"event","event":"output","body":{"category":"stdout","output":"##2 main"}}
##2 mainTo client: {"seq":0,"type":"event","event":"output","body":{"category":"stdout","output":"(\"--quiet\", \"--tty\", \"/tmp/vscode-bash-debug-fifo-14686\", \"--tty_in\", \"/tmp/vscode-bash-debug-fifo-14686_in\", \"--library\", \"/mnt/c/Users/Han/.vscode/extensions/rogalmic.bash-debug-0.3.9/bashdb_dir\", \"--\", \"/mnt/d/myplace/scripts/ParseTrainAddtoGcal/test.sh\") called from file `/mnt/c/Users/Han/.vscode/extensions/rogalmic.bash-debug-0.3.9/bashdb_dir/bashdb' at line 0\n"}}
("--quiet", "--tty", "/tmp/vscode-bash-debug-fifo-14686", "--tty_in", "/tmp/vscode-bash-debug-fifo-14686_in", "--library", "/mnt/c/Users/Han/.vscode/extensions/rogalmic.bash-debug-0.3.9/bashdb_dir", "--", "/mnt/d/myplace/scripts/ParseTrainAddtoGcal/test.sh") called from file `/mnt/c/Users/Han/.vscode/extensions/rogalmic.bash-debug-0.3.9/bashdb_dir/bashdb' at line 0
To client: {"seq":0,"type":"event","event":"output","body":{"category":"stdout","output":"18762############################################################\n"}}
18762############################################################
To client: {"seq":0,"type":"event","event":"output","body":{"category":"telemetry","output":"Execution breaks at '->0 in file `/mnt/d/myplace/scripts/ParseTrainAddtoGcal/test.sh' at line 1'\n"}}
To client: {"seq":0,"type":"response","request_seq":5,"command":"stackTrace","success":true,"body":{"stackFrames":[{"id":0,"source":{"name":"test.sh","path":"D:\\myplace\\scripts\\ParseTrainAddtoGcal\\test.sh","sourceReference":0,"adapterData":"bash-adapter-data"},"line":1,"column":0,"name":"->0 in file `/mnt/d/myplace/scripts/ParseTrainAddtoGcal/test.sh' at line 1"},{"id":1,"source":{"name":"bashdb","path":"C:\\Users\\Han\\.vscode\\extensions\\rogalmic.bash-debug-0.3.9\\bashdb_dir\\bashdb","sourceReference":0,"adapterData":"bash-adapter-data"},"line":102,"column":0,"name":"##1 source(\"/mnt/d/myplace/scripts/ParseTrainAddtoGcal/test.sh\") called from file `/mnt/c/Users/Han/.vscode/extensions/rogalmic.bash-debug-0.3.9/bashdb_dir/bashdb' at line 102"},{"id":2,"source":{"name":"bashdb","path":"C:\\Users\\Han\\.vscode\\extensions\\rogalmic.bash-debug-0.3.9\\bashdb_dir\\bashdb","sourceReference":0,"adapterData":"bash-adapter-data"},"line":0,"column":0,"name":"##2 main(\"--quiet\", \"--tty\", \"/tmp/vscode-bash-debug-fifo-14686\", \"--tty_in\", \"/tmp/vscode-bash-debug-fifo-14686_in\", \"--library\", \"/mnt/c/Users/Han/.vscode/extensions/rogalmic.bash-debug-0.3.9/bashdb_dir\", \"--\", \"/mnt/d/myplace/scripts/ParseTrainAddtoGcal/test.sh\") called from file `/mnt/c/Users/Han/.vscode/extensions/rogalmic.bash-debug-0.3.9/bashdb_dir/bashdb' at line 0"}],"totalFrames":4}}
To client: {"seq":0,"type":"event","event":"output","body":{"category":"stdout","output":"File /mnt/d/myplace/scripts/ParseTrainAddtoGcal/ParseTrainAddtoGcal.sh loaded.\n"}}
File /mnt/d/myplace/scripts/ParseTrainAddtoGcal/ParseTrainAddtoGcal.sh loaded.
To client: {"seq":0,"type":"event","event":"output","body":{"category":"stdout","output":"break </mnt/d/myplace/scripts/ParseTrainAddtoGcal/ParseTrainAddtoGcal.sh:28 > \n"}}
break </mnt/d/myplace/scripts/ParseTrainAddtoGcal/ParseTrainAddtoGcal.sh:28 >
To client: {"seq":0,"type":"event","event":"output","body":{"category":"stdout","output":"Breakpoint 1 set in file /mnt/d/myplace/scripts/ParseTrainAddtoGcal/ParseTrainAddtoGcal.sh, line 28.\n"}}
Breakpoint 1 set in file /mnt/d/myplace/scripts/ParseTrainAddtoGcal/ParseTrainAddtoGcal.sh, line 28.
To client: {"seq":0,"type":"event","event":"output","body":{"category":"stdout","output":"break </mnt/d/myplace/scripts/ParseTrainAddtoGcal/ParseTrainAddtoGcal.sh:92 > \n"}}
break </mnt/d/myplace/scripts/ParseTrainAddtoGcal/ParseTrainAddtoGcal.sh:92 >
To client: {"seq":0,"type":"event","event":"output","body":{"category":"stdout","output":"Breakpoint 2 set in file /mnt/d/myplace/scripts/ParseTrainAddtoGcal/ParseTrainAddtoGcal.sh, line 92.\n"}}
Breakpoint 2 set in file /mnt/d/myplace/scripts/ParseTrainAddtoGcal/ParseTrainAddtoGcal.sh, line 92.
To client: {"seq":0,"type":"event","event":"output","body":{"category":"stdout","output":"break </mnt/d/myplace/scripts/ParseTrainAddtoGcal/ParseTrainAddtoGcal.sh:96 > \n"}}
break </mnt/d/myplace/scripts/ParseTrainAddtoGcal/ParseTrainAddtoGcal.sh:96 >
To client: {"seq":0,"type":"event","event":"output","body":{"category":"stdout","output":"Breakpoint 3 set in file /mnt/d/myplace/scripts/ParseTrainAddtoGcal/ParseTrainAddtoGcal.sh, line 96.\n"}}
Breakpoint 3 set in file /mnt/d/myplace/scripts/ParseTrainAddtoGcal/ParseTrainAddtoGcal.sh, line 96.
To client: {"seq":0,"type":"event","event":"output","body":{"category":"stdout","output":"Source files which we have recorded info about:\n"}}
Source files which we have recorded info about:
To client: {"seq":0,"type":"event","event":"output","body":{"category":"stdout","output":" /mnt/d/myplace/scripts/ParseTrainAddtoGcal/ParseTrainAddtoGcal.sh: /mnt/d/myplace/scripts/ParseTrainAddtoGcal/ParseTrainAddtoGcal.sh, 195 lines\n"}}
/mnt/d/myplace/scripts/ParseTrainAddtoGcal/ParseTrainAddtoGcal.sh: /mnt/d/myplace/scripts/ParseTrainAddtoGcal/ParseTrainAddtoGcal.sh, 195 lines
To client: {"seq":0,"type":"event","event":"output","body":{"category":"stdout","output":" /mnt/d/myplace/scripts/ParseTrainAddtoGcal/test.sh: /mnt/d/myplace/scripts/ParseTrainAddtoGcal/test.sh, 2 lines\n"}}
/mnt/d/myplace/scripts/ParseTrainAddtoGcal/test.sh: /mnt/d/myplace/scripts/ParseTrainAddtoGcal/test.sh, 2 lines
To client: {"seq":0,"type":"event","event":"output","body":{"category":"stdout","output":"Num Type Disp Enb What\n----------------------------\n"}}
Num Type Disp Enb What
----------------------------
To client: {"seq":0,"type":"event","event":"output","body":{"category":"stdout","output":"1 breakpoint keep y /mnt/d/myplace/scripts/ParseTrainAddtoGcal/ParseTrainAddtoGcal.sh:28\n"}}
1 breakpoint keep y /mnt/d/myplace/scripts/ParseTrainAddtoGcal/ParseTrainAddtoGcal.sh:28
To client: {"seq":0,"type":"event","event":"output","body":{"category":"stdout","output":"2 breakpoint keep y /mnt/d/myplace/scripts/ParseTrainAddtoGcal/ParseTrainAddtoGcal.sh:92\n"}}
2 breakpoint keep y /mnt/d/myplace/scripts/ParseTrainAddtoGcal/ParseTrainAddtoGcal.sh:92
To client: {"seq":0,"type":"event","event":"output","body":{"category":"stdout","output":"3 breakpoint keep y /mnt/d/myplace/scripts/ParseTrainAddtoGcal/ParseTrainAddtoGcal.sh:96\n"}}
3 breakpoint keep y /mnt/d/myplace/scripts/ParseTrainAddtoGcal/ParseTrainAddtoGcal.sh:96
To client: {"seq":0,"type":"event","event":"output","body":{"category":"stdout","output":"18762############################################################\n"}}
18762############################################################
To client: {"seq":0,"type":"response","request_seq":6,"command":"setBreakpoints","success":true,"body":{"breakpoints":[{"verified":true,"line":28,"id":1},{"verified":true,"line":92,"id":2},{"verified":true,"line":96,"id":3}]}}
From client: setExceptionBreakpoints({"filters":[]})
To client: {"seq":0,"type":"response","request_seq":7,"command":"setExceptionBreakpoints","success":true}
From client: threads(undefined)
To client: {"seq":0,"type":"response","request_seq":8,"command":"threads","success":true,"body":{"threads":[{"id":42,"name":"Bash thread"}]}}
From client: continue({"threadId":42})
To client: {"seq":0,"type":"response","request_seq":9,"command":"continue","success":true}
To client: {"seq":0,"type":"event","event":"output","body":{"category":"stdout","output":"continue\n"}}
continue
To client: {"seq":0,"type":"event","event":"output","body":{"category":"stdout","output":"Debugged program terminated normally. Use q to quit or R to restart.\n"}}
Debugged program terminated normally. Use q to quit or R to restart.
To client: {"seq":0,"type":"event","event":"output","body":{"category":"telemetry","output":"Sending TerminatedEvent"}}
To client: {"seq":0,"type":"event","event":"terminated"}
From client: disconnect({"restart":false})
To client: {"seq":0,"type":"event","event":"output","body":{"category":"stderr","output":"Terminated\n"}}
Terminated
To client: {"seq":0,"type":"response","request_seq":10,"command":"disconnect","success":true}
Details
assigning a variable in date string will cause the watch result for this variable to be arithmatically calculated. For example,
foo = '2022-1-17'
in VS Code watch list $foo
will equal to 2004
. Bash itself still considers $foo
to be '2022-1-17'
though