Anthony D
Anthony D

Reputation: 11247

Visual Studio step into doesn't return

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.

Upvotes: 1

Views: 520

Answers (4)

i_am_jorf
i_am_jorf

Reputation: 54600

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

Upvotes: 1

Ben M
Ben M

Reputation: 22492

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

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

Upvotes: 4

Stuart Thompson
Stuart Thompson

Reputation: 1859

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.

Upvotes: 1

ChrisW
ChrisW

Reputation: 56113

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.

Upvotes: 1

Related Questions