One of the difficulties in using a debugger as powerful as WinDbg is the need to know the various commands and when to use them. There are lots of articles about windbg but the most comprehensive for a beginner is the tutorial that comes with the installation of windbg, the appropriately named “Kernel_debugging_tutorial.doc”.
The document begins with setting up a debugging session between the host and the target system and goes on to explain some the most common commands with good example. Why blog about something that is part of application you ask ? :) here is why, the document is not part of the start menu items nor is it available from the application. In order to open it you have to browse to the windbg installation folder.
This tutorial is a must read for its simplicity and coverage of advanced topics with ease. here is an example for a situation i faced before reading this tutorial. while debugging with windbg i found some local variables to be missing from the locals window and i couldn’t track them.I overcame the limitation temporarily by using globals. later i posted a newsgroup question as to why this happens and Ivan of Microsoft was kind enough to point to me that optimization was causing this. When i was reading through the tutorial i was surprised to find a section titled “Dealing with code optimization” , that goes on to explain that this is usually seen with free build or build with optimizations turned on.
A big thanks for the person(s) who wrote this tutorial, which is a good read for even those with moderate familiarity to Windbg. :)
if you are looking for a step by step guide to use windbg another good starting point is Ilias’s blog post of the same topic
another good referance point is http://windbg.dumpanalysis.org/ , which also has links to download latest versions of Windbg.
bye for now :)