Rider .NET debugger attach fails on Linux under ptrace restrictions
0 reputation · 21 Aug 2021, 15:01 UTC
Attach failure under Linux ptrace restrictions
Rider attempts to attach its .NET debugger to a running process on Linux using ptrace. When kernel.yama.ptrace_scope is set to 1 or 2, the attach can fail for processes that are not children of the IDE or are owned by another user. Rider typically reports a generic attach failure instead of identifying ptrace denial as the cause.
The exact error text, diagnostic log location, and fallback behavior vary across Rider versions, JetBrains Runtime builds, and target .NET runtimes. It is unresolved whether Rider should detect ptrace denial at attach time and surface a distribution-specific remediation hint inside the IDE.
What should Rider display when ptrace blocks an attach? Should the IDE distinguish ptrace denial from other attach failures? Is a distro-specific hint appropriate, or should Rider only advise checking system ptrace settings?