views:

227

answers:

4

I have a multi threaded application. It also uses some unmanaged code, an ODBC driver. If I am in a specific thread, sometimes I hit step over, F10, however it doesn't stop on the next line, the program runs as though I have hit F5 to continue. Any ideas why this is?

Update 1

When I say the program runs, I mean the thread I am in. I have one file that is a signal thread. I break on C, hit F10, and with out any break I get instructions the whole way to Z.

+1  A: 

One possibility is that the thread which you were debugging continues (when you press F10), and blocks/sleeps on something inside the subroutine before it returns to your breakpoint (i.e. your 'next' instruction); and when you says "the program runs" maybe that's only the other threads running.

ChrisW
+1  A: 

Without more specific details it is difficult to know exactly why you are seeing this behavior as there are several reasons why this might occur. The thread may be blocked, an exception may have occured (F10 is step over), or the symbols loaded for that module might not match the source to name a few.

You might try reading the responses to this question It may contain additional useful information.

Stuart Thompson
+4  A: 

This is a bug in Visual Studio 2008. It is corrected by this hotfix.

(I had the same issue. Drove me absolutely mad.)

Ben M
+1  A: 

This can also happen if the method you're stepping over threw an exception.

jeffamaphone