This is a submission for DEV's Summer Bug Smash: Smash Stories powered by Sentry.

Background

I was building a Coding Activity Tracker to give me realistic timing for how long I actually spend coding — typing, reading, debugging, idle, everything. For that to work, it needed to know when Visual Studio was debugging anything, because breakpoints completely change how an app behaves.

Running the tracker standalone meant it had to detect external debugging sessions.

Debugger.IsAttached only detects debugging of the current process, so standalone mode always reported “no debugger,” even when Visual Studio was actively debugging another project.