用qtcreator 调试纯c++程序

2330阅读 0评论2014-09-28 mxcai2005
分类:C/C++

os: ubuntu 12.04 x64
Qt 5.2.1 + QtCreator 3.0.1

设置断点,点击调试运行时报如下错误

“ptrace: Operation not permitted.

Could not attach to the process. Make sure no other debugger traces this process.
Check the settings of /proc/sys/kernel/yama/ptrace_scope For more details, see /etc/sysctl.d/10-ptrace.conf”


解决方法:
 echo 0 | sudo tee /proc/sys/kernel/yama/ptrace_scope 

参考链接:

http://developer.nokia.com/community/wiki/Qt_Creator_%E4%BD%BF%E7%94%A8%E6%8A%80%E5%B7%A7

上一篇:使用valgrind检查内存问题
下一篇:cc1plus: error 无法从gb2312 转换到 utf-8