Question

Qt creator throws an error every time I want to start debugging. Here is the error:

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

I have googled the error message and got some result about bug in the kernel but I am able to run gdb in command line, so I don't think it is kernel/gdb related.

What can be the cause of this error?

Was it helpful?

Solution

I just did some research and found the solution somewhere. It turns out that /proc/sys/kernel/yama/ptrace_scope was set to 1. After I changed it to 0, the problem disappeared.

Explanations of ptrace can be found here and here, as Merlin069 said.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top