Skip to content

Latest commit

 

History

History
41 lines (30 loc) · 905 Bytes

README.md

File metadata and controls

41 lines (30 loc) · 905 Bytes

clrmd-middleware

ASP.NET Core Middleware for introspecting current dotnet process using Microsoft.Diagnostics.Runtime

Call services.AddClrMd() in your ConfigureServices Method:

public void ConfigureServices(IServiceCollection services)
{
    services.AddMvc().SetCompatibilityVersion(CompatibilityVersion.Version_2_2);
    services.AddClrMd();
}

Register the Middleware in your Configure-Method by calling app.UseClrMd()

public void Configure(IApplicationBuilder app, IHostingEnvironment env)
{
    if (env.IsDevelopment())
    {
       app.UseDeveloperExceptionPage();
    }
    else
    {
      app.UseHsts();
    }

    app.UseClrMd();

    app.UseHttpsRedirection();
    app.UseMvc();
}

calling the diagnostics endpoint under http://localhost:56868/diagnostics

Generating Memory Dumps

http://localhost:56868/diagnostics/dump