Workaround:
From https://www.jetbrains.com/help/clion/attaching-to-local-process.html#prereq-ubuntu
If you use CLion on Ubuntu (or probably another Linux distribution), the first time you try to connect to a local process, you can get the ptrace: Operation not allowed command. error message. To disable it and enable binding to the local function of the process, follow these steps:
To temporarily disable this restriction, enter the command:
echo 0 | sudo tee /proc/sys/kernel/yama/ptrace_scope
To disable this restriction permanently, open the file /etc/sysctl.d/10-ptrace.conf for editing and change the line kernel.yama.ptrace_scope = 1 to kernel.yama.ptrace_scope = 0 . To apply the changes, enter: sudo service procps restart or reboot the system of your choice.
source share