55

I often use VS 2008 to debug a .NET C# component of an application. Sometimes, I want to quit debugging and continue running the application. Stop Debugging kills the process I was debugging.

How can I achieve my aim?

This is not a web app, it's a local process that runs managed and unmanaged code.

I found the "Detach All" option in the Debug menu, however it is disabled (grayed out).

SamB
  • 9,039
  • 5
  • 49
  • 56
Valentein
  • 847
  • 1
  • 8
  • 17

3 Answers3

48

Open the Processes window (Debug->Windows->Processes), right-click the process, select "Detach Process".

sbi
  • 219,715
  • 46
  • 258
  • 445
39

You cannot detach a debugger from a process if you are debugging in mixed mode.

Make sure you are debugging either in managed or native mode while attaching to the process: either make sure "Enable native code debugging" or "Native Code" is unchecked in your project options, or start the program without debugging, choose "Attach to Process", and select only Managed or only Native.

Harsh Verma
  • 414
  • 4
  • 3
9

Debug -> Detach All

Works great on my VS2008 and VS2010.

Svisstack
  • 16,203
  • 6
  • 66
  • 100