4

We need to debug .NET Full CLR and Core CLR applications running on production Windows servers, without the possibility of resorting to remote debugging (msvsmon), or installing a full IDE (Visual Studio/Visual Studio Core, ...).

How could we debug these applications?

A 64-bit version of MDbg can be retrieved via NuGet. It doesn't work with ASP.NET Core processes, either 32 or 64-bit.

Other observations:

  • The version of MDbg retrieved through NuGet can be forced into 32-bit with corflags /32BITREQ+ /Force Mdbg.exe, which allows you to debug 32-bit Full CLR processes.
  • There is an open GitHub issue to port MDbg.exe to CoreCLR, which indicates that it's not currently available.
Cody Gray - on strike
  • 239,200
  • 50
  • 490
  • 574
Mathieu Renda
  • 14,069
  • 2
  • 35
  • 33
  • 3
    [WinDbg + SOS.dll](https://learn.microsoft.com/en-us/windows-hardware/drivers/debugger/debugging-managed-code). – Cody Gray - on strike Aug 24 '17 at 14:52
  • I think it used to be more difficult, but SOS.dll is now included in the .NET Core repository, @Thomas. – Cody Gray - on strike Aug 24 '17 at 15:11
  • This question might be suitable on Software Recommendations. However, not so many debugging people are active over there. If I get SOS up and running for CoreCLR, I'd be glad to answer your question over there with some instructions. If you port it, delete it here. Make sure you notify me with the new location of the question. – Thomas Weller Aug 24 '17 at 15:13
  • Might be related: https://stackoverflow.com/questions/32291110/where-can-i-get-sos-for-windows-10-iot – Thomas Weller Aug 24 '17 at 15:15
  • 1
    If you want to debug exceptions you can use procdump to create memory dumps of your application and analyze on a different machine. It is not clear if you need source level debugging. That is not possible with Windbg because it cannot understand C# code. – Alois Kraus Aug 25 '17 at 07:00

0 Answers0