As everyone knows WinDBG is the most powerful debugger in Windows. But few people find it’s difficult because it’s not friendly like Visual Studio. Only raw text output in the debugger console. (of course thread,process,local watch windows etc. are available) but still its interesting if you can access few quick relevant information with a single click? WinDBG supports embedding hyperlinks in the command output with DML(Debugger Markup language).
As an example, if you faced some crash issues with some wrong version of DLL, probably you might be needed to check the version of the DLL loaded into process’s address space.
lm is the command used to display list the loaded modules. Ok just try with lmD
You can see that on clicking the hyperlink shdocvw windbg send the command hidden in that link (lmDvmshdocvw – lm (list modules) D(DML) m(pattern)module name) and displays details of the corresponding DLL. The behavior changes according to the context and implementation of commands. For e.g if kb displays the call stack and the frame numbers will be enabled with DML links.On clicking the frame numbers, it jumps to corresponding stack frame in the current call stack. You can see what’s the command going to be executed at status bar by hovering the mouse over the link.
Not all commands are implemented DML support. You can turn on/off DML support globally according to your convenience. Once the DML support enabled globally, WinDBG will automatically calls the DML version of the commands if available.
You can turn on DML support by – .prefer_dml 1
You can turn this feature off by – .prefer_dml 0
Once after you enable DML mode, if you give lm command, you will get the same output of lmD. Try it with other commands as well. Happy debugging!