All,
I've been working lately at upgrading my debugging tools and
procedures, and have come to looking how I can improve debugging
bash.
I know about bash -x , but its terribly annoying because, even though
it shows the evaluated text, there is no explicit way to tie that
output back to the script that ran it. For example, with a script
like:
echo $x
Where x = 1, when you run bash -x , you will see:
+ echo 1
With no obvious way to tie this back to the place in the script that
ran bash.
What I was wondering is if there was a way to make this explicit, ie:
bash -X (or somesuch) which would output something like:
ltmain.sh:110 + echo 1
Where ltmain.sh is the name of the script, and line 110 is the line #
of the associated program.
So - does something like this exist, and if not, would it be easy to
add?
Thanks,