简体   繁体   中英

Howto debug a .net dmp file in visual studio 2017

My service which is implemented as a windows service crashes on a customer server every 2 weeks +- some days.

  • The service is written in .net (vb.net/c#)
  • Compiled for any-cpu
  • Without prefer 32bit
  • .net Framework 4.5.2
  • Runs on a server with 64bit cpu
  • Visual Studio is 2017 Professional

Since i'm unable to reproduce the problem, i want to debug the dump file.

I did setup user-mode dumps on the server based on https://msdn.microsoft.com/en-us/library/windows/desktop/bb787181%28v=vs.85%29.aspx?f=255&MSPPError=-2147217396

The following picture shows how i have configured the user-mode dump in the registry: 在此处输入图片说明

I can open this dump, but the only information i get is

The thread tried to read from or write to a virtual address for which it does not have the appropriate access. 在此处输入图片说明

If i then start debugging (Managed Only, Mixed and Native Only), the following error is shown:

Unhandled exception at 0x000007FEF3FB09AF (clr.dll) in FooService.exe.3616.dmp: 0xC0000005: Access violation reading location 0x0000000000000000. 在此处输入图片说明

Any hint what i need to do in order to get more information out of the .dmp file?

I guess i do now understand (more or less).

I did not save the pdb files used during the compilation of the release mode files, and tried to recreate those pdb files based on the same source, and this seems not to work for debugging the minidump in visual studio.

But with the Debug Diagnostic Tool v2 Update 2 from from microsoft, i was able to get the Stack Trace of the exception based on my already existent minidump, and i'm now able to locate the error.

I still don't understand why visual studio can't show the same information.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM