Visual Studio freezing while debugging

I have serious problem with Visual Studio. I have quite common code in it I put several breakpoints and run app, it works correctly. I stop it, then run again and still ok. After several debug steps VS stops on breakpoint and freezes definitely, machine is completely down and irresponsible I must reboot it.

Few more details, there is a separate thread handling with API Object (works as a graph with results). Debugger (and just immediately whole OS) hangs when there is a breakpoint (or exception) inside the thread and there is a request for API Object repaint which is suspended by debugger.
[605 byte] By [dentiol] at [2007-11-20 11:47:55]
# 1 Re: Visual Studio freezing while debugging
I'm experiencing the same problem with Visual C++ 6(SP6) too, and cannot figure out why it happens. However, when this happens, there is way to dismiss the freezing situation without rebooting. First, you should open a Command Prompt box, then, when the freeze happens, use Alt-Tab to switch to the Command Prompt box and type 'pskill msdev' or 'pskill <msdev-process-id> to kill the msdev.exe process, and your whole system is free.

pskill is a free command line process tool from Sysinternals(now acquired by Microsoft).

You may experience serious delay when doing Alt-Tab and keyin the pskill command when the freeze happens, but be patient until you've done.
chjfth at 2007-11-11 4:02:52 >
# 2 Re: Visual Studio freezing while debugging
control-alt-delete -> Task Manager

will let you kill apps and processes.
dglienna at 2007-11-11 4:03:54 >
# 3 Re: Visual Studio freezing while debugging
Out of interest, are you all using Windows XP? I'm plagued with this problem under XP and I know of several others who experience it too. The strange thing is that it doesn't lock up my CPU. Task Manager shows only a few percent of CPU usage.

In my case I can dual boot with Win2K and the problem never happens at all with Win2K. It's so bad under XP that I now do all my debugging under 2K. I hope that solution works for you too.
John E at 2007-11-11 4:04:53 >