Is it possible to debug bash scripts line-by-line? Is it possible to debug bash scripts line-by-line? bash bash

Is it possible to debug bash scripts line-by-line?


See bashdb.

If it's installed on your system, see man bashdb.

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


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

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

If you are on a Mac (like I was) then you might need to install the GNU version of Bash.

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

Once you have MacPorts...

port install bash

Then follow the instructions to

./configure (in bashdb unpacked directory)

make

sudo make install

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