Поделиться через


installing & configuring debugging tools for windows

There are umpteen blogs out there that discuss various debugging techniques. So what is so different about this one? Nothing really. It’s just something that I am adding as a reference for myself and for any soul out there that is starting out with debugging. As part of my job, I need to start learning debugging and that’s the whole reason why I am writing this out. Writing this out also helps me remember things better.

Everyone knows what Debugging Tools For Windows is. Also known as Windbg, it is a very powerful debugger that you can use to analyze memory dumps (.DMP files) for user more and kernel mode processes, from any Windows environment. Debugging skills are essential for any serious developer & any serious support professional. There is native debugging and .NET (Managed) debugging, which I will discuss later. So let’s get started.

So what type of machine do you need? Any Windows XP or later PC with at least 2 GB of RAM is what I recommend. The more, the better.

Installing Debugging tools for Windows (x86). Download from this Microsoft site

I recommend installing using the typical options. The install isn’t very big, but the symbols (aka .PDB files) will take up space on your hard disk. For those who do not know what symbols are & why they are important, please jump to this URL: PDB Files

You need symbols only if you are performing native debugging – Typical C, C++, Windows SDK programs. .NET debugging doesn’t require symbols.

Create a folder on a hard drive with at least 2-4 Giga bytes of disk space for your symbol store. The symbol store can be in any location. You only need to tell the debugger where the symbols are. I usually create a folder named Symbols with 2 sub folders. Private & Public. Private symbols are PDB files that are proprietary to your company. Public symbols contain lesser information so that others cannot re-engineer products. Also, you shouldn’t mix private & public symbols as it may confuse the debugger. However, you can put x86 and x64 symbols in the same folder.

  • Fire up Windbg from the Start menu. (Under Debugging tools for Windows folder).
  • Select File menu and then Symbol File path. Alternatively, press CTRL+S.
  • Enter the path to your symbol store as follows: SRV*D:\symbols\Public*https://msdl.microsoft.com/download/symbols
  • Click on File menu and then select Save Workspace.

NOTE: SRV is a keyword here. Each parameter is separated with a *. The internet address provided above is the address of Microsoft’s public symbol server. Yes! Microsoft provides public symbols for most of its products so that others can debug problems with their products.

NOTE: If you want to further customize the appearance of Windbg, click on View menu and then Option… Do not forget to click on File menu and select Save Workspace after making the changes. The reason for this is, it saves all your settings for the next debug session, or else you will need to enter the symbol path again. You can also use the _NT_SYMBOL_PATH to configure where the debugger should look for symbols. For more information, see this KB Article: Using Microsoft Symbol Server

You are all set to debug now.