Share via


How to stop WinDbg from going crazy and loading all the symbols

One of my favorite features of WinDbg is that it doesn't load all the symbols up-front.  That's a huge part of what makes it so much faster than Visual Studio.  However, every once in a while you can do things that cause WinDbg to go crazy and load all the symbols in a desperate attempt to resolve a symbol that it just isn't finding.  Oftentimes this is because of a typo, or because you forgot to scope the symbol to a module.  It's annoying - but it's not something that you have to live with.

To tell WinDbg not to do it's whole-hog symbol search use this command:

.symopt+ 100

If you find yourself in a situation where you don't want to wait for the debugger to finish resolving symbols before issuing the command, you can just start windbg with the -snul parameter.  In some cases, the reason this is happening is some goofy breakpoint you set, or something in your watch window - it's not going away.  If you don't want to take the time to track it down, you can bail on the workspace by starting windbg with the -WX parameter, and saving whatever you put into the first one.

Here's what the documentation has to say on the topic:

SYMOPT_NO_UNQUALIFIED_LOADS
This symbol option disables the symbol handler's automatic loading of modules. When this option is set and the debugger attempts to match a symbol, it will only search modules  [whose symbols] have already been loaded.
This option can be used as a defense against mistyping a symbol name. Normally, a mistyped symbol will cause the debugger to pause while it searches all unloaded symbol files. When this option is active, a mistyped symbol will not be found in the loaded modules, and then the search will terminate.
This option is off by default. It can be activated by using the -snul command-line option. Once the debugger is running, it can be turned on or off by using .symopt+0x100 or .symopt-0x100, respectively


All postings are provided "AS IS" with no warranties, and confers no rights. Use of included script samples are subject to the terms specified at https://www.microsoft.com/info/cpyright.htm