bash 的图形调试器
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/6216007/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Graphical debugger for bash
提问by Open the way
Is it there any graphical debugger for bash on mac os x or linux? I mean something in the same fashion that the debugging mode of Visual Studio or Eclipse, where one can stop the program hover the mouse pointer over variables and get instantly values, modify them and go backwards and try modifications without the need to start the program fomr the beginning. I am talking about very long bash scripts
在 mac os x 或 linux 上是否有用于 bash 的图形调试器?我的意思是与 Visual Studio 或 Eclipse 的调试模式相同的方式,其中可以停止程序将鼠标指针悬停在变量上并立即获取值,修改它们并返回并尝试修改而无需启动程序开始。我说的是很长的 bash 脚本
采纳答案by Ben English
for debugging execute your script with:
用于调试执行您的脚本:
bash -x <scriptname>
gui debugger: http://bashdb.sourceforge.net/
gui调试器:http: //bashdb.sourceforge.net/
回答by avkosinsky
Debugger for Bash version 3(Bourne again shell). Plugin for Eclipse. Will only work with shell script editor ShellEd. http://sourceforge.net/projects/basheclipse/
Bash 版本 3 的调试器(Bourne 又是 shell)。Eclipse 插件。仅适用于 shell 脚本编辑器 ShellEd。 http://sourceforge.net/projects/basheclipse/
回答by Leo Ufimtsev
I haven't come across a visual debugger, but bashdb works quite well for debugging. You can set breakpoints, continue, print variables etc..
我还没有遇到过可视化调试器,但是 bashdb 非常适合调试。您可以设置断点、继续、打印变量等。
https://sourceforge.net/projects/bashdb/
https://sourceforge.net/projects/bashdb/
Install via your distro's repositories. There is a quick-start guide here: http://www.rodericksmith.plus.com/outlines/manuals/bashdbOutline.html(first chapter takes only half an hour to read/try).
通过发行版的存储库安装。这里有一个快速入门指南:http: //www.rodericksmith.plus.com/outlines/manuals/bashdbOutline.html(第一章阅读/尝试只需半小时)。
回答by chrimuelle
I have found the vscode-bash-debugextension (https://github.com/rogalmic/vscode-bash-debug) for the visual studio codeeditor (https://code.visualstudio.com/) very useful.
我已经找到了vscode-bash-debug延长(https://github.com/rogalmic/vscode-bash-debug的)visual studio code编辑器(https://code.visualstudio.com/)非常有用。

