問題描述
有誰知道一個好的初學者教程在 C++ 中使用調試器?
Does anyone know a good beginners tutorial for using the debugger in C++?
我覺得我錯過了很多.我知道怎么做單步執行代碼并查看局部變量(雖然這常常會給我帶來問題,但似乎有時有自己的想法!).
I feel as if I am missing out on a lot. I know how to step through the code and look at the local variables (although often even this causes me problems, it seems to have a mind of its own sometimes!).
其他一切(調用堆棧、運行線程等)意味著對我來說什么都沒有,我還沒有回溯到我可以破譯(與分割的示例問題不同當回溯總是指向某個函數時的錯誤你的代碼!).基本上我只是插入 cout 并沒有更好聲明,這通常是我最終要做的 :)
Everything else (call stack, running threads etc.) means nothing to me and I have yet to have a back trace that I can decipher (unlike in the sample problems for segmentation faults when the back trace always points to some function in your code!). Basically I am no better off just inserting cout statements which is normally what I end up doing :)
我正在使用 Code::Blocks 但愿意暫時更改 IDE學習調試器,如果有一個非常好的教程.我的教程發現要么只是解釋如何逐步執行我已經完成的代碼知道或者他們真的很全面地解釋了一切,這只是對我的小腦袋來說是壓倒性的,在這個階段真的沒有必要.
I am using Code::Blocks but would be willing to temporarily change IDE to learn the debugger if there was a really nice tutorial. The tutorials that I have found either just explain how to step through the code which I already know or they are really comprehensive explaining EVERYTHING, which is just overwhelming for my little brain and not really necessary at this stage.
推薦答案
我建議以下 教程 開始使用 Visual Studio 2010.它包含有關調用堆棧, 調試多線程程序 和其他可能需要的東西.Visual Studio 2010 的速成版是免費提供的,AFAIK 其調試器具有與商業版完全相同的功能.
I'd suggest the following tutorial for Visual Studio 2010 to start with. It contains information about call stack, debugging multithreaded program and other things which may be needed. The express edition of Visual Studio 2010 is available for free and AFAIK its debugger has precisely the same features as commercial editions.
這篇關于適合初學者的良好調試器教程的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網!