17

I'm debugging a (web) project in Visual Studio 2008. I'm hitting a breakpoint. F10 continues to the next line, as expected, but the next F10 just stops debugging and the code continues without any more debugging (like pressing F5). Why is this happening?

  • I have tried 'clean solution'.
  • Other breakpoints sometimes(!) skipped, even in the same method

Any clues?

vgru
  • 49,838
  • 16
  • 120
  • 201
edosoft
  • 17,121
  • 25
  • 77
  • 111

8 Answers8

19

It is probably because you do not have the update kb 957912 for Visual Studio 2008. That fixed the same issue on my machine.

Alyn
  • 206
  • 1
  • 2
12

Make sure that you're in Debug mode not in Release.

Vadim
  • 21,044
  • 18
  • 65
  • 101
1

Without knowing more about your application it's difficult to say, but usually this sort of thing happens when the process starts a thread or otherwise goes into code where there isn't any debug information.

ChrisF
  • 134,786
  • 31
  • 255
  • 325
0

I was having this issue while developing a Web App that was running on IIS on my local machine. I found that opening the task manager and killing the process (w3wp), then trying again made the problem go away temporarily.

John Meyer
  • 2,296
  • 1
  • 31
  • 39
0

There could be an exception while executing the instruction in question. Try enabling all exceptions to break into debugger and check.

Canopus
  • 7,351
  • 11
  • 46
  • 57
0

It almost sounds like you have the default settings for your debugging. If you go to: Tools
- Options - Debugging Under the general section there is a option to "Enable Just My Code" By default that is checked, if you uncheck that you should be able to step into the code that you want to see.

Without knowing more about your project and code that you reference, this is my best guess as to why you can’t step into the code.

Hope it helps Rihan

Rihan Meij
  • 1,759
  • 1
  • 14
  • 18
0

F10 is Step Over. This means that any methods called by your current method will not be shown in the debugger. If these throw an uncaught exception or somehow end execution, debugging will just end, which would result in what you are experiencing.

F11 (Step Into) is usually a better idea when stepping through code.

Powerlord
  • 87,612
  • 17
  • 125
  • 175
  • 3
    He didn't say he wants to step in - he said he wants to step over. Saying F11 is better than F10 is just not right. – TheSoftwareJedi May 19 '09 at 23:07
  • 1
    @TheSoftwareJedi: Really? Did you read the question name? "Why does F10 (continue) in Visual Studio not work?" The reason being because F10 isn't Continue. – Powerlord May 20 '09 at 13:32
  • Not sure why the step into is better. I have the situation as TS both F10 and F11 doesn't work. – Vitaliy Aug 30 '17 at 19:54
  • I’ll take 10 or 11 at this point. It skips over many of them and it’s not related to that. I have used the commands on screen as well as a sanity check. – logixologist Aug 05 '21 at 04:49
0

It might be stepping over the last executing code in the thread or somehow it's going back to the UI thread. If it's a GUI app, try doing something that invokes an event handler and see if it breaks on the next execution.

Davy8
  • 30,868
  • 25
  • 115
  • 173