Using Procdump to generate dumps on a specific .net core exception
Published Dec 14 2022 06:21 AM 5,997 Views
Microsoft

The prelude:

========

My morning coffee was too strong today and it kicked me into thinking out-of-the-box ideas. Procdump is a great tool for collecting dumps in a Production environment, but I wanted to take it one step further to generate a dump on a specific .net core exception.

 

For example, I wanted to get a dump when IOException occurs with the below command:

 

procdump64.exe -e 1 -f IOException donetcoreapp.exe

 

When the System.IO.IOexception is raised in the target process, there is neither exception type name displayed nor dump generated, you only see the output like the below:

[04:42:56] Exception: E0434352.CLR

 

The out-of-box trick:

=============

Here are the steps that got the job done:

 

To dump exceptions for a 64-bit .net core app:

  • Download the 64-bit dbgshim nuget package from the below link to the machine:

NuGet Gallery | Microsoft.Diagnostics.DbgShim.win-x64 6.0.360101

 

  • Extract the 64-bit dbgshim.dll from the 64-bit package to the same folder as the procdump.

To dump exceptions for a 32-bit .net core app:

  • Download the 32-bit dbgshim nuget package from the below link to the machine:

NuGet Gallery | Microsoft.Diagnostics.DbgShim.win-x86 6.0.360101

 

  • Extract the 32-bit dbgshim.dll from the 32-bit package to the same folder as the procdump.

Then you can get the exception dump successfully.

...

[15:15:35] Exception: E0434F4D.System.IO.IOException ("I/O error occurred.")

[15:15:35] Dump 1 initiated: ...
[15:15:37] Dump 1 complete: 1 MB written in 1.4 seconds

...

 

Happy Debugging!!!

 

Co-Authors
Version history
Last update:
‎Dec 14 2022 06:26 AM
Updated by: