简单地说:有没有人知道gdb的GUI可以与最新版本的Visual c++中的特性集相提并论或接近?
详细说明:作为一个在Windows上花了大量时间编程的人,每当我必须在Linux中编写c++代码时,我发现的一个较大的绊脚石是,使用命令行gdb调试任何东西所花费的时间比在Visual Studio中长几倍,而且随着练习,它似乎并没有变得更好。有些东西用图形表示更容易或更快。
具体地说,我正在寻找一个GUI:
Handles all the basics like stepping over & into code, watch variables and breakpoints
Understands and can display the contents of complex & nested C++ data types
Doesn't get confused by and preferably can intelligently step through templated code and data structures while displaying relevant information such as the parameter types
Can handle threaded applications and switch between different threads to step through or view the state of
Can handle attaching to an already-started process or reading a core dump, in addition to starting the program up in gdb
如果这样的程序不存在,那么我希望听到人们使用至少满足其中一些要点的程序的经验。
有人有什么建议吗?
编辑:
列出这些可能性很好,我也会尽我所能,但如果你能在回答中包括以下内容,那就更有帮助了:
(a)你是否实际使用过这个图形用户界面,如果使用过,你对它有什么积极/消极的反馈。
(b)如果你知道,上述哪些功能是受支持的或不受支持的
列表很容易获得,像这样的网站很棒,因为你可以了解人们使用应用程序的个人体验。
Qt Creator似乎是个好东西。一位同事向我展示了一种调试的方法:
Create a new project, "Import of Makefile-based Project".
Point it to your root project folder (it will index sources under it, and it is impressively fast).
Go to project settings and add a run configuration, then specify the executable you want to debug, and its arguments.
Qt Creator seems to insist on building your project before debugging it. If you don't want that, or don't use make, just go to projects -> build (Left panel), then, on the right panel in "Build Steps", remove all the steps, including the step by default when you created the project.
对于调试一个我已经编译好的应用程序来说,这似乎有点多,但这是值得的。调试器以类似于Visual Studio的方式显示线程、堆栈和局部变量,甚至使用许多相同的键盘快捷键。它似乎可以很好地处理模板,至少std::string和std::map。附加到现有进程和核心转储似乎是受支持的,尽管我还没有测试它。
请记住,我现在使用它不到一个小时,但迄今为止我印象深刻。
In the last 15 months I use insight (came with FC6). It is not great, it is written in Tcl/Tk, but it is simple and useful. DDD is of similar quality / utility, but somewhat harder to use (various GUI gotchas and omissions). I also tried to integrate gdb with my IDE, SlickEdit. It worked OK (I played some 4 hours with it), but I did not like the GUI context switches. I like my IDE to remain unchanged while I am debugging; on Windows I use SlickEdit for IDE and Visual Studio Debugger for debugging. So from the 3: Insight, DDD and SlickEdit, Insight is my 1st choice, I use it >95% of the time, command-line gdb and DDD make up the other 5%. If I get the chance, I will eval Eclipse at some point, my work PC does not seem to have enough RAM (1GB only) to run Eclipse reasonably well.
我也听到了很多对TotalView的赞美,包括在一次工作面试中。我在2008年底获得了对我们公司的评估,但最终我们没有继续进行,因为gdb足够满足我们的需求;而且它是免费的,无处不在。