ClrMD is a set of advanced APIs for programmatically inspecting a crash dump of a .NET program much in the same way that the SOS Debugging Extensions (SOS) do. This allows you to write automated crash analysis for your applications as well as automate many common debugger tasks. In addition to reading crash dumps ClrMD also allows supports attaching to live processes.
See the version list below for details.
Requires NuGet 2.5 or higher.
Install-Package Microsoft.Diagnostics.Runtime -Version 0.8.31-beta
dotnet add package Microsoft.Diagnostics.Runtime --version 0.8.31-beta
<PackageReference Include="Microsoft.Diagnostics.Runtime" Version="0.8.31-beta" />
paket add Microsoft.Diagnostics.Runtime --version 0.8.31-beta
Since the last release, I have made two major changes to the API.
First, I have reworked the SymbolLocator class. I had to rush out the last version so that we could ship sources, and that class was in an incomplete state. It has been subsequently reworked into a new design.
Second, as part of the effort to (finally) release 1.0 of the library and get it out of beta (which hasn't happened yet), I have marked some commonly used APIs with the [Obsolete] attribute. Virtually no functionality has been removed, only that APIs have been renamed or moved within the runtime. The one exception is that ClrMD is moving away from doing symbol resolution (File and Line number). This means GetSourceLocationForOffset and related functions no longer work. Instead, I have implemented a sample you can find here: https://github.com/Microsoft/clrmd/blob/master/src/FileAndLineNumbers/Program.cs
Note that all methods marked [Obsolete] will be removed in the next NuGet release (but I do not plan to do another release for a little while). I appologize in advance for any incovenience this causes. After years of active development, some API dead-ends have inevitably crept into the library, and need to be removed before 1.0 is released.
Aside from various bugfixes, here are some noteworthy changes in this release:
1. I've added Async APIs for symbol resolution/download, and the SymbolLocator class is now thread safe. You can now download symbols asynchronosly and in parallel.
2. Added basic support for converting CLR internal structures (MethodDescs, MethodTables, EEClass, etc) to and from ClrMD types and methods.
3. Add a way to get information about the Shared and System domains.
4. Completely remove the dependency on msdia120.dll and DiaLib.dll. Added a managed PDB reader to do this work instead. ClrMD currently has no dependencies on any other library (that doesn't come with windows anyway).
This package has no dependencies.
Showing the top 10 GitHub repositories that depend on Microsoft.Diagnostics.Runtime:
The Roslyn .NET compiler provides C# and Visual Basic languages with rich code analysis APIs.
.NET debugger and assembly editor
Mono open source ECMA CLI, C# and .NET implementation.
Powerful .NET library for benchmarking
PerfView is a CPU and memory performance-analysis tool
A fast, powerful, CommonMark compliant, extensible Markdown processor for .NET
Port of LMAX Disruptor to .NET
Contains samples and documentation for libraries and tools of the .NET framework. Pull requests welcome!
SharpLab (previously known as TryRoslyn)
Dump and analyze .Net applications memory ( a gui for WinDbg and ClrMd )