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

好久不见. 提交于 2019-11-30 20:33:23

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 writing http://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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!