Is there a way to get inside a nested call to bash script.
Example: https://github.com/AladW/aurutils/blob/master/lib/aur-sync#L172
Where aur
is a bash script /usr/bin/aur
that passes its arguments to another bash script /usr/lib/aurutils/aur-repo
.
btw. Why not move this project to GitHub, likt zshdb :)
I don't have a clear idea of the scope what you are expecting let alone how to implement that in the bash debugger bashdb.
Often when I want to debug shell scripts inside other shell scripts, I create a little wrapper shell script like this in file ~/bin:/aur
Then I make sure that my PATH is arranged to call
~/bin
over the one in/usr/bin
. And I setenvironment variable $DEBUG_SCRIPT to" bashdb".
If you want an envornment variable that you can test if you are already inside bashdb, you can use
_Dbg_DEBUGGER_LEVEL
.As for bashdb and sourceforge. This project predates github, I am appreciative to sourceforge for hosting this project all of these years. And it is not a bad idea not to put all of one's eggs in one github service.
Last edit: Rocky Bernstein 2019-10-18
Thanks for shraring this tip, I've just fought thare is something like
step inside
which test the next script line with something likegrep -q shell\ script <(file $(which cd))
and if it's a bash script it exec it withbashdb
.Last edit: szczepaniak bartek 2019-10-19
That is called the "debug" command. See http://bashdb.sourceforge.net/bashdb.html#Debug
I spent a lot of time documenting the debugger. Please make more use of it.
Last edit: Rocky Bernstein 2019-10-19
Sorry for my ignorance, and I appreciate your help - I'm going to study the manual inside out now ;)