dotnet / diagnostics

This repository contains the source code for various .NET Core runtime diagnostic tools and documents.
MIT License
1.19k stars 355 forks source link

Fix error in dump requests command #5012

Closed sainath-reddy-gnv closed 1 month ago

sainath-reddy-gnv commented 1 month ago

Fixed an issue with the !dumprequests command that was causing an error when reading dumps from a Kestrel host.

0:000> !dumprequests
Field 'Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http2.Http2Stream<Microsoft.AspNetCore.Hosting.HostingApplication+Context>.<Method>k__BackingField' is not of type 'string'.

In Kestrel host dumps, the <Method>k__BackingField field in the HttpContext object is of Enum type, whereas in IIS host dumps, it is of String type. To address this, the _methodText field in the HttpContext object is now read if the <Method>k__BackingField field is not of String type.

Also added min width for each column for better readability.