Qt Creator, ptrace: Operation not permitted. What is the permanent solution?

后端 未结 3 1952
春和景丽
春和景丽 2020-12-22 23:55

While debugging C++ code in Qt creator I get the following error

ptrace: Operation not permitted.

Could not attach to the process. Make sure no         


        
3条回答
  •  星月不相逢
    2020-12-23 00:08

    I got the answer.

    • Go to the location /etc with root privilege.

    • Find the file rc.local.

    • Open it in a text editor like gedit and add the following code there
    • echo 0 | tee /proc/sys/kernel/yama/ptrace_scope

    Restart your pc and you can see the debugger working perfectly.

提交回复
热议问题