简体   繁体   中英

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?

是的,去调试->Windows->线程

Debug | Windows | Threads

or

Ctrl + Alt + H

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.

如果您使用的是 VS 2008,请查看有关VS 2008 多线程改进的此截屏视频。

此外,在创建线程时为其命名,这样可以更轻松地在 Visual Studio 的线程工具窗口中识别它们。

我最近一直在使用 Allinea 的 DDTLite 插件 - 很好地融入了 VS2008 (SP1) 并提供了许多非常有用的窗口来管理多个线程(步进、断点等),甚至只是同时查看线程的位置(一种像树一样的堆栈视图,真的很酷)。

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM