在Qt Creator中调试C++
代码时,我遇到了以下错误
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
这里找到了一个临时解决方案:在QtProject中尝试调试时收到错误
临时解决方案(不会在重启后生效):
echo 0 | sudo tee /proc/sys/kernel/yama/ptrace_scope
但是每次启动电脑使用Qt时都需要在终端中运行相同的代码很麻烦。
What is the permanent solution for this?
/etc/rc.local
中)。 - Pavel Strakhov