George Mauer
George Mauer

Reputation: 122212

How can I see my applications threads while debugging in Visual Studio?

I would like to see the threads currently active in my application while debugging it.

How can I do this using Visual Studio?

Upvotes: 17

Views: 24860

Answers (7)

Ferruccio
Ferruccio

Reputation: 100748

Debug | Windows | Threads

or

Ctrl+Alt+H

Upvotes: 16

Iqra.
Iqra.

Reputation: 763

You can simply track the threads either through visual studio or just from task manager. In the case of VS- after debugging your application just navigate to debug from upper menu options then goto to windows and then threads. Debug->Windows->Thread. sometimes you might not get information from VS thread windows so go to task manager from desktop and navigate to thread column. refer the image below. Here you go

Upvotes: 0

Dave
Dave

Reputation:

I've been using Allinea's DDTLite plugin recently - drops into VS2008 (SP1) pretty well and gives a number of really really useful windows for managing multiple threads (stepping, breakpoints, ..) or even just seeing where threads are at the same time (a sort of tree like view of the stacks, it's really cool).

Upvotes: 0

Jimmer
Jimmer

Reputation:

Also, give your threads names when you create them, it makes it easier to identify them in the threads tool window in visual studio.

Upvotes: 2

Bill
Bill

Reputation: 1758

While RichS' answer is technically correct, the information displayed in that window is not as helpful if you have a number of thread in wait states or sleeping.

I would recommend you make sure you name your threads for better visibility in the Thread window. Use the Thread.Name property to assign a meaningful name to your thread. You'll be glad you did.

Upvotes: 7

Gulzar Nazim
Gulzar Nazim

Reputation: 52198

If you are using VS 2008, check this screencast on VS 2008 multi-threading improvements..

Upvotes: 5

RichS
RichS

Reputation: 3147

Yes, go to Debug->Windows->Threads

Upvotes: 41

Related Questions