Skip to content

Latest commit

 

History

History
 
 

Microsoft.Diagnostics.Runtime "CLR MD"

CLR MD is a C# API used to build diagnostics tools. It gives you the power and flexibility of what the SOS and PSSCOR debugger extensions can do in a simple, fast C# API.

Some features include:

  1. Memory Diagnostics
  2. Walking the GC Heap.
  3. Walking roots in the process.
  4. Walking all heaps that CLR owns, such as JIT code heaps, AppDomain heaps, etc.
  5. Walk threads in the process to get managed callstacks.
  6. Walk AppDomains in the process.
  7. Walk COM wrappers in your process (v4.5+ only).
  8. And more...

FAQ

Please see the FAQ for more information.

Tutorials

Here you will find a step by step walkthrough on how to use the CLR MD API. These tutorials are meant to be read and worked through in linear order to teach you the surface area of the API and what you can do with it.

  1. Getting Started - A brief introduction to the API and how to create a CLRRuntime instance.

  2. The CLRRuntime Object - Basic operations like enumerating AppDomains, Threads, the Finalizer Queue, etc.

  3. Walking the Heap - Walking objects on the GC heap, working with types in CLR MD.

  4. Types and Fields in CLRMD - More information about dealing with types and fields in CLRMD.

  5. Machine Code in CLRMD - Getting access to the native code produced by the JIT or NGEN