Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Possible to kill/terminate a certain thread in the Visual Studio debugger?

Currently trying to hunt a potential race condition, I paused my WinForms application in the visual studio debugger.

The Threads window shows a lot of thread which one of them I suspect to be the root cause for the blocking.

enter image description here

I would now love to do the following:

  1. Select a thread
  2. Right-click the thread
  3. Select "Kill thread" from the context menu

Unfortunately I found no option that would allow me to do something like that.

My question:

Is it possible to kill/terminate a certain thread in the Visual Studio 2013 debugger?

like image 899
Uwe Keim Avatar asked Nov 13 '13 09:11

Uwe Keim


People also ask

How do I freeze a thread in Visual Studio?

In the Threads window, right-click any thread and then select Freeze. A Pause icon in the Current Thread column indicates that the thread is frozen.

How do I stop a Visual Studio Debug session?

To end a debugging session in Microsoft Visual Studio, from the Debug menu, choose Stop Debugging.

How do I stop all running threads in C#?

foreach (Form form in Application. OpenForms) { form. Close(); } Application. Exit();


1 Answers

From Microsoft Technet I found Process Explorer that can solve your problem.

like image 91
Stefano Bafaro Avatar answered Oct 03 '22 07:10

Stefano Bafaro