views:

1604

answers:

4

Hello.

I've faced the strangest problem with Visual Studio C# debugger in my career. In short after break point in my code was hit I cannot step through the code. F11 (step into) and F10(step over) work for several times, but eventually VS performs F5 (continue) action. I still able to debug using break point on every line.

This behavior reproduces on each project developer's machine. It's Visual Studio SP1 everywhere.

I've checked every (as far as I understand) option. I've disabled "just my code". I've disabled "step thought properties". I've disabled automatic property evaluation. In despair I've recreated all project and solution files from scratch.

Is there any solution to my problem?

Update This behavior could be reproduced only on this project.

Update 2 This does not seems like threading problem: it reproduces under VS's developer web server...

+2  A: 

It looks like this has been discussed before: http://stackoverflow.com/questions/310788/why-does-microsoft-visual-c-2008-express-edition-debugger-randomly-exit

Some of the suggestions in the other topic might help you out.

Jon Tackabury
+1  A: 

OK then. It's NHProf's fault. I've just disabled it and debugger went right. NHProf generates *SocketException*s if there no mother application running aside. It provokes context switching.

Thank you, Jon Tackabury

Artem Tikhomirov
+2  A: 

This KB article might be interesting for those that find this thread back.

Hans Passant
A: 

I changes the port of visual studio development server (Project > Properties > Web > Server: User Visual Studio Development Server: Specific port = 49468) and work fine.. just try that

a52