Jump to content

Using Procdump to generate dumps on a specific .net core exception


Recommended Posts

Posted

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:

 

 

 

  • 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:

 

 

 

  • 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!!!

 

Continue reading...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...