w0051977
w0051977

Reputation: 15817

Visual Studio - attach to process

I am trying to understand what the 'Attach to process' is useful for in Visual Studio. I am looking for a memory leak and I am finding WinDBG quite difficult to use to say the least. I realize there are other commercial alternatives like ANT Profiler.

What is 'attach to process' used for specifically? I have searched online and have found plenty of documentation explaining what to select in Visual studio and how to use macros with this feature, but no documentation explaining what this is useful for specifically.

UPDATE 19/06/2012 at 19:40 GMT I have managed to attach the Visual Studio debugger to a process running (small VB.NET program). However, I have noticed that the PDB files don't seem to be needed i.e. I can add breakpoints and step through the code without them. Are the PDB files needed when attaching to a process in Visual Studio?

Upvotes: 2

Views: 5642

Answers (1)

Oded
Oded

Reputation: 499382

If you are running an application in a different user context and need to debug it, you can attach to the process. This process can be local or remote.

Essentially it is used to debug an already running process.

Note: You do need to have the source code for this process in Visual Studio (or have a symbol server that Visual Studio can use that points to the same executable).

Upvotes: 7

Related Questions