Partager via


MEX Debugging Extension for WinDbg

Hello All, I'd like to share with you guys that like to analyze dump files the following tip:

The official version of the MEX extension publish was released and it is available for download at:

https://www.microsoft.com/en-us/download/details.aspx?id=53304

This extension is widely used by Microsoft Support Engineers in troubleshooting process applications.

After performing the download of MEX, you just need to extract the DLL to the winext subdirectory of WinDbg.

WinDbg is a user mode and kernel mode debugger with a graphical interface that uses the infrastructure of debuggers NTSD, CDB and KD to provide a more similar environment with Visual Studio, with watch windows, visual breakpoints on lines of code and other facilities for example, view variables (including C ++ objects), stack traces, and memory.

Examples of some MEX extension of commands:

 .load mex

 This command is used to load the MEX extension inside WinDbg so we can access the commands.

!mex.help

 This command displays the help of MEX extension grouped by category.

mex1

!clrstack2

 This command is used to display the managed call stack of the current thread.

clrstack2

 !dae

 This command is the DumpAllExceptions abbreviation.  It lists all the exceptions that were in memory at the time when the DUMP was collected.

dae

!us

 This command is short for UniqueStacks responsible for list all grouped by callstack threads.

us

! Mex.writemodule -a -p "destination path"

 This command is used to extract all binaries used by the application to an specific path.

writemodule

 !do2 "address"

 Short for DumpObject, this command displays the details of an object.

!sqlcn

Provides an overview of ADO.NET connections to SQL Server

I hope that you enjoy it!

Comments

  • Anonymous
    January 10, 2017
    Exceptional work, much appreciated! Saved me time and headache.
    • Anonymous
      January 10, 2017
      Excellent feedback! I am very glad that it helped you.
  • Anonymous
    May 17, 2017
    Amazing post!!
  • Anonymous
    May 17, 2017
    Can you please help which directory this would be --you just need to extract the DLL to the winext subdirectory
    • Anonymous
      May 22, 2017
      You should extract inside the winext directory of the WinDbg directory, i.e., C:\Program Files (x86)\Windows Kits\10\Debuggers\x86\winext\ or C:\Program Files (x86)\Windows Kits\10\Debuggers\amd64\winext.The default installation directory for 64 bit OS installs for the debugging tools is C:\Program Files (x86)\Windows Kits\10\Debuggers. If you have a 32-bit OS, you can find the Windows Kits folder under C:\Program Files. To determine if you should use the 32 bit or 64 bit tools, see Choosing the 32-Bit or 64-Bit Debugging Tools. More details available at: https://msdn.microsoft.com/en-us/library/windows/hardware/ff543998(v=vs.85).aspxI hope have helped.Regards,