While debugging C++ code in Qt creator I get the following error
C++
ptrace: Operation not permitted. Could not attach to the process. Make sure no
I got the answer.
Go to the location /etc with root privilege.
/etc
Find the file rc.local.
rc.local
echo 0 | tee /proc/sys/kernel/yama/ptrace_scope
Restart your pc and you can see the debugger working perfectly.