VS/C++ runaway process debugging
-
How could I find out where a runaway process is looping? I can attach to the process using the VS debugger but not clear where to go from there. (Also, I tried to get a dump at that point but got a permanent hourglass and had to kill the VS session.) Or is there a way at some higher level to kill the process and cause it to take a crash dump that could later be analyzed?
-
How could I find out where a runaway process is looping? I can attach to the process using the VS debugger but not clear where to go from there. (Also, I tried to get a dump at that point but got a permanent hourglass and had to kill the VS session.) Or is there a way at some higher level to kill the process and cause it to take a crash dump that could later be analyzed?
Alan Kurlansky wrote:
How could I find out where a runaway process is looping?
Interesting choice of words. It contains the WinDbg command that could help your situation. :) If you attach the WinDbg debugger you can issue the !runaway command which will show you the thread times. Any thread in an infinite loop will probably consume the most cpu time. You may also want to try "!locks" and "!analyze -v -hang" in case its not an infinite loop and actually a deadlock caused by synchronization objects. Off Topic: I really wish the VS team would add a commandline interface into the VS debugger. Best Wishes, -David Delaune