Log all CLR exceptions using WinDbg

This is a short post to complement my earlier post regarding post-mortem debugging. Sometimes, an application or service crashes without giving us an opportunity to save a detailed memory dump. In such a scenario, it may be useful to run WinDbg, attach to the process of the application or service, and log all exceptions that occur. To log an exception (handled or not) and continue process execution use the following command:

sxe -c "!pe;!clrstack;gc" clr

All credits go to this post here.



Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s