MathematicalOrchid
MathematicalOrchid

Reputation: 62868

Attaching the debugger to a process doesn't seem to do anything

I've got a C++ application that doesn't quite work right. When I ask VisualStudio to run it, it runs just fine. But when I copy the compiled binary to its final location, it whinges about some sort of permissions problem.

I would dearly love to know exactly where it's getting stuck. According to this MSDN article, it's supposed to be possible to attach the VisualStudio debugger to an arbitrary process. But when I do this... nothing happens.

I copy my compiled binary to the right place, and run it. I leave it running, and switch back to VS. Go to Debug → Attach to process… and select my running program. VS clearly goes into debug mode, but... I can't see anything. The call stack is blank, it won't tell me what code is running... I can't do anything!

(Again: There's no error message. It seems to have connected just fine. It's just that nothing happens.)

Clearly a debugger that won't let you do anything is utterly pointless, so this obviously isn't what's supposed to happen. How do I make it so VS will actually show me what's running, let me poke variables, step through stuff, etc. You know, debug stuff?

(Again, this is unmanaged C++ code compiled to native machine code.)

Upvotes: 1

Views: 493

Answers (1)

Ralara
Ralara

Reputation: 569

The "Break All" button will break into a running process that you are attached to. It's the one that looks like a pause button.

Upvotes: 1

Related Questions