vscode-bash-debug
vscode-bash-debug copied to clipboard
$0 is set to bashdb - what about using "bash --debugger"?
When debugging bash scripts, we currently have that $0
evaluates to usr/bin/bashdb
.
In order to solve this, what about using the --debugger
option of bash? See the Description section of http://bashdb.sourceforge.net/bashdb-man.html
About the --debugger
option - this is something for next release.
Currently we run bashdb with:
bashdb --quiet --tty ./fifo_file_path -- script.sh arg1 arg2
just wondering how to pass those bashdb
params with this:
bash --debugger [bash-options...] script-name [[--] script options]
Great to hear! Which version of bashdb does support it?
It seems to be there since 2006-01-29 (see https://sourceforge.net/p/bashdb/code/ci/master/tree/ChangeLog )
About the --debugger option - this is something for next release.
Great! Looking forward to it. PS: you can read more here: http://bashdb.sourceforge.net/bashdb.html#Having-bash-invoke-the-debugger-and-your-shell-script
I am getting the following message within the "DEBUG CONSOLE" tab when I debug my script: "tput: No value for $TERM and no -T specified"
I use T_COLS=tput cols
so I can determine the number of columns for proper formatting.
Is there something I didn't set correctly. I checked and confirmed the environmental variable TERM is set.
@kooshball - please provide more details, since i cannot reproduce that:
- operating system info + vscode bitness if needed
- simplest bash script source to reproduce the problem
just wondering how to pass those
bashdb
params with this:bash --debugger [bash-options...] script-name [[--] script options]
according to http://bashdb.sourceforge.net/bashdb.html#Having-the-debugger-invoke-your-shell-script
This method uses another script called bashdb which allows for giving its own options
it seems the drawback of using --debugger
is failed to passing bashdb
params.
Hello everyone, any progress about this $0 limitation; when will it be fixed ?
After investigation it turned out that "bash - - debugger" cannot be used. Hovever, bash 5.0 was supposed to allow setting $0 and this was done as far as I remember.