I am starting to get really frustrated with the Visual Web Developer Express Debugging.
edit – This is mostly regarding debugging C#
It seem often I set two or three break points. And what happens is the cursor ends up going around in a loop. I will have been through all of my breakpoints but instead of exiting the debugging and showing me the result of the web page in the browser the cursor jumps back to the beginning.
Or I will be half way through my break points and the cursor will jump back to the previous breakpoint and and get stuck in a loop, again always jumping back to the previous break point.
It seems the debugger is not consistent either sometimes it will work fine and other times it will do as described above.
Sometimes I get a yellow arrow with a tiny blue dot in the margin when this is happening. Which when I hover over it says “The process or thread has changed since the last step” what is that all about?
Also I am getting inacurate Exceptions. I have a method in C# that takes an out parameter. When the cursor reaches this method call sometimes it gives me a null reference exception. But it is an out parameter they are allowed to be null. And again VWD seems to be inconsistent. Sometimes I get this problem, most of the time I don’t.
Am I doing something wrong or has VWD Debugger got a lot of screws loose?
Please help me because I am starting to use my mind!
My suspicion is that you have many threads running concurrently in the same code. When you put a breakpoint down, that breakpoint applies to all the threads, not just the one that was running when you made it. If you hit “go” and another thread starts running, and it hits the breakpoint first, that’s the thread that you’re now debugging. It can be very confusing.
What I do when I’m in that scenario — and I am in that scenario every single day, believe me — I get in the habit of always freezing every thread but the one I am actually wanting to debug. That way the program is effectively single-threaded while I am debugging it. Just don’t forget to thaw them out!