How Do You Debug a Hanging Process

Run the program that is freezing or hanging, and that you wish to debug.Run the Debugging Tool for Windows. … Click on the File menu, and select Attach to a Process. … Find the process for the program which you wish to debug. … The command window should automatically open.

How can we detect hanging process?

  1. run ps to find list of PIDs of the watched processes (along with exec time, etc)
  2. loop over the PIDs.
  3. start gdb attaching to the process using its PID, dumping stack trace from it using thread apply all where , detaching from the process.
  4. a process was declared hung if:

How do I debug a process in Windows?

If the debugger is already active, you can noninvasively debug a running process by using the . attach -v (Attach to Process) command in the Debugger Command window. You can use the . attach command if the debugger is already debugging one or more processes invasively.

Sarah Jenkins

Sarah Jenkins

Senior Technology Editor & AI Specialist

Sarah Jenkins is a veteran tech journalist with over 12 years of experience covering artificial intelligence, mobile innovations, and digital ethics. Her insights have appeared in leading technology publications worldwide.

Share this article
Twitter Facebook Pinterest