Saturday, May 09, 2009

Managed Stack Explorer – .Net 2/3/3.5 (i.e. CLR 2) thread hang, stack trace and managed process monitor utility (with source)

CodePlex - Managed Stack Explorer

“Welcome to the Managed Stack Explorer Homepage!

Do you ever need to get stack traces for your .NET 2.0 applications? Want a quick and easy way to monitor managed processes and threads? Need a way to view a thread's stack trace to investigate an application hang? If so, Managed Stack Explorer is for you.

Managed Stack Explorer is a lightweight tool that allows you to do just this. Simply copy the executable anywhere and start monitoring your stack traces today.

…”

Microsoft Downloads - Managed Stack Explorer 1.0 – English

“…

File Name: MSESetup.msi
Date Published: 6/6/2006
Language: English
Download Size: 1.5 MB

Managed Stack Explorer is a simple executable, no install required, that can be copied and run anywhere the .NET Framework 2.0 is installed. MSE uses the Debugging and Profiling APIs to attach and then immediately detach from an application, only suspending the application / thread for the minimum amount of time required to obtain the stack trace.

This download contains the code signed version of Managed Stack Explorer 1.0, written internally by Microsoft. Visit the Managed Stack Explorer Project Homepage on CodePlex for source code, community-collaboration, and updates.

…”

image

A couple years old, but it’s an easy bet we’re going to see .Net 2/3/3.5 (aka CLR 2) code around for years yet to come, so this utility (which has source included ;) still has some legs.

And of course having the source (C#) is a huge plus in my book… ;)

image

(via If broken it is, fix it you should - Neat .NET 2.0 StackViewer to troubleshoot hangs/performance issues)

6 comments:

Anvoy said...

hi Greg, i tried the stack explorer, i could see all the running Exe's but not any services. Our code runs as windows services. Is there any setting you know to look into threads for services or is this feature not supported?

thanks
Anvoy.

Greg said...

Are you on Vista? Try running it as Admin and see if that helps.

On XP I'm able to see Managed EXE's running as Services in MSE.

On Vista, no. That is UNTIL I ran it as Admin. Then I could see the Managed EXE's running as services on Vista.

Anvoy said...

well i am running it on Windows server 2008 and i am logged in as an admin. the only managed processes i see are 2 devenv.exe's and a couple of Ssms.exe

Greg said...

Then I hate to say it, but the only thing that comes to mind at this point is say maybe comment in the Project's discussion forum to see if there's someone there who might be able to help...

I wish I could have been of more help,
Greg

Vasya said...

I'm observing similar behavior as described by Anvoy. Found out that it seems to be 32bit/64bit related.
First of all MSE perfectly shows services when running on 32 bit operating system. When running on 64bit system it starts as 32bit process and shows only 32bit processes.

Vasya said...

Addition to my previous post.
I goggled a bit and found out that someone recompiled MSE to support 64 bit. I've just tried it and it seems to work fine.

http://artisticcheese.blogspot.com/2010/04/managed-stack-explorer-compatible-with.html