Python – Attach to Process

To debug another process, such as a Blender Addon, one has to configure Linux to allow ptrace (process trace) to attach to processes outside of their own scope. To set this config permanently modify or create the file /etc/sysctl.d/10-ptrace.conf and edit/add following line:

kernel.yama.ptrace_scope = 0

To apply the change immediately, run

echo 0 | sudo tee /proc/sys/kernel/yama/ptrace_scope

in the terminal.

Leave a Reply

Your email address will not be published. Required fields are marked *