views:

273

answers:

4

I'm using Visual Studio 2008 on a 64-bit version of Vista. After my program stops on one of my breakpoints, I can't step over or into the current line without either an Illegal Instruction exception or an Access Violation exception being thrown by my application. If I right-click on the next line and choose "Run to here" (equivalent to "Step over"), it works fine.

Addendum: there is nothing in any watch windows.

Also, here's something I forgot to mention: if I attach to the process, everything works just fine.

Has anyone run into this problem before?

A: 

Are you getting the exceptions in your application, or Visual Studio itself?

I would start by doing Clean on the entire solution then Build again. Sometimes if your binaries get out of sync you can get weird behavior when debugging.

17 of 26
I updated the question to answer your question.Yes, I have clean built my project. No dice. It's really frustrating. :/
mos
A: 

Is your application multithreaded?

In case it is:

Are you shure the Access violation is thrown by the thread that you are debuging ? Did you freeze all other threads?

RED SOFT ADAIR
It is multi-threaded, but freezing the other threads does nothing.
mos
A: 

If you have any function calls in any of the watch windows, clear them out.

sean e
I updated the question in answer to this comment.
mos
+2  A: 

Mos, I was wondering have you resolved this problem (since I also have it with VS2005 and VS2008 on 64-bit Win7)?

Edit: "Uncheck Tools/Options/Debugging/Native/Enable RPC debugging" was suggested in comment, and seems to be the answer.

Goran
I have not. I've wiped my system and reinstalled everything (including upgrading to Windows 7), and it still happens. At this point I'm leaning toward it being a hardware issue.
mos
Could you try to uncheck Tools/Options/Debugging/Native/Enable RPC debugging? Does it help? It does at my place, although, I'm not sure for how long. :)
Goran
Somehow, I missed your comment when it was posted. I'm glad I ended up reviewing these answers again, "just to be sure." Sure enough, disabling RPC debugging did the trick. Thanks so much!
mos