Introduction
Let's say your application is creating lot of threads. You can inspect these threads in Threads
windows in Visual Studio.
![](/KB/debug/412473/AllThreads.png)
The problem is that there are system related threads that are not directly related to your application and it will be nice if those un-related threads could be filtered out of this window. In order to do this, you first click on the Flag icon. This will bring up a menu with one of the options Flag Just My Code as shown in the figure below:
![](/KB/debug/412473/JustMyCode.png)
When you click this option, in the Threads
window, all your application related threads will be flagged as shown below:
![](/KB/debug/412473/FlagsVisible1.png)
Now you can simply use the Group by option and choose to do the grouping by Flag Indicator.
![](/KB/debug/412473/grouping.png)
At this point, you can only leave Flagged Threads group as expanded and focus on the threads related to your application.
![](/KB/debug/412473/flaggedthreads.png)
I hope you find this tip helpful.
History
- 29th June, 2012: Initial version
Kamran Bilgrami is a seasoned software developer with background in designing mission critical applications for carrier grade telecom networks. More recently he is involved in design & development of real-time biometric based security solutions. His areas of interest include .NET, software security, mathematical modeling and patterns.
He blogs regularly at http://WindowsDebugging.Wordpress.com