I'm trying to troubleshoot a larger multiprocessing issue -- I suspect a client library is creating a foreground thread, and I'm trying to see if that theory is correct.
In order to do that, I'd like to be able to log a list of all threads in a process, what their state is, and whether they are background or foreground.
I've seen Process.GetCurrentProcess().Threads, but that returns a ProcessThread object, not a System.Thread. ProcessThread doesn't have all of the properties that a System.Thread does.
Is there a way to get the list of System.Threads?
How about using Sysinternal's ProcMon
As @jvilalta pointed out, Process Explorer is also a good option.
Visual Studio natively has the ability to view all active threads, OR you could use DebugInspector (not sure of the url, sorry).
From C#, not sure how this can be done.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With