Is it possible to debug bash lines in turn?

I will like something like debugging Microsoft Visual Studio by default in bash, with current variable values, etc.

Is there any tool or way to do this? set -x and set -v are good, but not perfect.

+6
source share
2 answers

See bashdb .

If it is installed on your system, see man bashdb .

If it is not installed, see http://bashdb.sourceforge.net

+6
source

Yes. Use "bashdb" from http://bashdb.sourceforge.net/

Latest version at the time of writing http://sourceforge.net/projects/bashdb/files/bashdb/4.2-0.8/

If you are on a Mac (like me), you may need to install the GNU Bash version.

I did this using "MacPorts" http://www.macports.org/

Once you have MacPorts ...

install bash port

Then follow the instructions on

./configure (in unpacked bashdb directory)

to do

sudo make install

Then add the folder where bashdb can be found in your PATH

+1
source

All Articles