Excluding modules from symbol server search

Updated: 21.08.2005

Symbol server access is one of the most useful features of VS.NET debugger. It is very convenient to be able to automatically download symbols that match the current system with all hotfixes (or an end-user system, if we want to debug a crash dump). But there is a small issue - some modules do not have their symbols on the public symbol server. But debugger does not know about it, and therefore every time we start the debugging session, the debugger contacts the symbol server and tries to download symbols for the modules - without success. As a result, startup time of the debugging session can increase significantly, especially for applications that use lots of 3rd party components, whose symbols cannot be on Microsoft symbol server by definition.

Fortunately, there is a solution - we can tell the debugger that some modules should be excluded from symbol server search.

Here is how to do it:

1. Upgrade symsrv.dll.

This small DLL is responsible for symbol server access. VS.NET distribution contains a relatively old version of this DLL, which does not support symbol server exclusion list. We should upgrade it with a newer version, which is supplied with Debugging Tools for Windows (version 6.5 is the latest at the time of this writing). After we have downloaded and installed Debugging Tools, symsrv.dll should be copied from its installation directory to <VSInstallDir>\Common7\IDE directory.

2. Specify the exclusion list in symsrv.ini file.

This file should be created in <VSInstallDir>\Common7\IDE directory (the directory where symsrv.dll is located).

[exclusions] section of this file should contain the list of files to be excluded from the symbol server search. Wildcards are supported, and I prefer to replace all file extensions with * wildcard to make sure that all possible debug information file formats are excluded.

Here is a sample symsrv.ini file that asks the debugger to exclude msxml4.dll and shlwapi.dll from symbol server search:

;start of symsrv.ini
;end of symsrv.ini