Udostępnij za pośrednictwem


Quick news: A new managed library to help with debugging

Greetings, developers. In case you missed it, take a look at this post by Lee Culver, a software developer on the .NET Runtime team, which introduces you to a new managed library that allows you to automate inspection tasks and access more debugging info. Below is a quick excerpt from the beginning of the post. The post continues with an example and related code in three sections: “Getting Started,” “Analyzing the Heap,” and “ClrMD Features and Functionality.”

Today are we excited to announce the beta release of the Microsoft.Diagnostics.Runtime component (called ClrMD for short) through the NuGet Package Manager.

ClrMD is a set of advanced APIs for programmatically inspecting a crash dump of a .NET program much in the same way as the SOS Debugging Extensions (SOS). It allows you to write automated crash analysis for your applications and automate many common debugger tasks.

We understand that this API won’t be for everyone -- hopefully debugging .NET crash dumps is a rare thing for you. However, our .NET Runtime team has had so much success automating complex diagnostics tasks with this API that we wanted to release it publicly.

One last, quick note, before we get started: The ClrMD managed library is a wrapper around CLR internal-only debugging APIs. Although those internal-only APIs are very useful for diagnostics, we do not support them as a public, documented release because they are incredibly difficult to use and tightly coupled with other implementation details of the CLR. ClrMD addresses this problem by providing an easy-to-use managed wrapper around these low-level debugging APIs.

Perhaps also of interest is this recent title: Inside Windows Debugging (Microsoft Press, 2012).