Netbeans:C 代码调试在启动时挂起
当我在 Netbeans 中开始调试时,没有任何反应。输出字符串不出现;暂停、继续、单步按钮处于非活动状态(仅停止调试按钮和重新启动按钮处于活动状态)。堆栈窗口为空。
我尝试在 shell 中运行进程并通过 Netbeans 调试附加到它。出现标题为“调试器错误”的消息,其中包含文本: \320\235\320\265\321\202 \321\202\320\260\320\272\320\276\320\263\320\276 \321\204\320\260\320\271\320\273\320\260\320\270\320\273\320\270 \320\272\320\260\321\202\320\260\320\273\320\276\320\263\320\260。
项目是用 -g 标志编译的; gdb版本是:GNU gdb 7.0.1-debian; Netbeans版本是7.1;在 DDD 工具中,该程序的调试工作正常。
When I start debug in Netbeans, nothig happens. Output strings don't apper; Pause, Continue, step buttons are inactive (only Stop debug button and restart button are active). Stack window is empty.
I tried to run process in shell and attach to it by Netbeans debug. Message with caption "Debugger error" appeared, it contained a text: \320\235\320\265\321\202 \321\202\320\260\320\272\320\276\320\263\320\276 \321\204\320\260\320\271\320\273\320\260 \320\270\320\273\320\270 \320\272\320\260\321\202\320\260\320\273\320\276\320\263\320\260.
Project is compiled with -g flag; gdb version is: GNU gdb 7.0.1-debian; Netbeans version is 7.1; In DDD tool debug for this program works fine.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
就我而言,原因是手表中的一个坏变量。当调试挂起时我无法删除它。因此,我必须在不构建/调试的情况下手动打开变量窗口(Windows -> 调试 -> 变量)。删除坏变量后,一切都很好。
基本上我删除了所有变量,因为我无法弄清楚为什么 gdb 或 netbeans 不喜欢这样的东西:
(char*)_Foo->Bar->失败
。在之前的调试运行中,这款手表运行良好。In my case the cause was a bad variable in the Watches. I couldn't delete it while debugging was hanging. So I had to open the variables window manually while not building/debugging (Windows -> Debugging -> Variables). After deleting the bad variable, everything was fine.
Basically I deleted all variables, since I couldn't figure out, why gdb or netbeans disliked something like:
(char*)_Foo->Bar->Fail
. During the previous debugging run this watch worked fine.