| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 1851 人关注过本帖
标题:Code:Blocks debug 问题
只看楼主 加入收藏
admin_xyz
Rank: 2
等 级:论坛游民
帖 子:195
专家分:77
注 册:2012-6-24
结帖率:97.3%
收藏
已结贴  问题点数:15 回复次数:1 
Code:Blocks debug 问题
Code:Blocks 在调试的时候在终端会显示
warning: GDB: Failed to set controlling terminal: Operation not permitted

搜索更多相关主题的帖子: warning Failed 
2012-06-30 09:37
hellovfp
Rank: 16Rank: 16Rank: 16Rank: 16
等 级:禁止访问
威 望:30
帖 子:2976
专家分:7697
注 册:2009-7-21
收藏
得分:15 
http://forums.

最后一楼就是解决办法:
Cool.

Thanks for the help.

To change the application type to GUI I used Project->Properties...->Build Targets tab.  I then selected "GUI application" in the Type: dropdown box.

I noticed I also had to go to Settings->Compiler and debugger...  Then I selected the "Debugger settings" on the left panel and checked the "Display debugger's log" check box.

A "Debugger (debug)" tab appeared at the bottom of the workspace and my output appeared there.

It also looks like I can keep using a terminal and simply ignore the warning as suggested by jens.  I have noticed, however, that my application doesn't exit debug mode quite the same as it does when I do a normal "Run."  When I run the program (simple Hello World) as a console application through the "Run" command, I get the message, "Press ENTER to continue."  After you hit enter the terminal window closes.  When I run the application using "Debug / Continue", the console appears, my output flashes on the screen, and the console quickly closes without the previous prompt.  Its probably worth mentioning that I have checked the "Pause when execution ends" check box under Projects->Properties->Build targets tab

I'm not sure if that is a bug or not.  Does Code::Blocks open and close the console or does gdb?  In any event the "problem" is easy enough to deal with by simply setting a breakpoint on the return call in main().

I'm using Code::Blocks 8.02 on Ubuntu 9.10 with gdb 7.0.

Thanks again for the help.

BTW... I'm just getting back into programming after a ~10 year hiatus.  I've tried a couple of the other linux open source based IDEs including KDevelop, Anjuta and Eclipse.  So far Code::Blocks has been the easiest to get up and running.  Thanks for the cool app.

V/R
Adam

我们都在路上。。。。。
2012-06-30 10:37
快速回复:Code:Blocks debug 问题
数据加载中...
 
   



关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.031098 second(s), 7 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved