Debugging Tools for Windows

Using a Source Server

A source server enables the debugger to automatically retrieve the source files that match the current target. To use a source server, you must be debugging binaries that have been source indexed at build time and whose source file locations are embedded in the PDB files.

Debugging Tools for Windows includes the source server SrcSrv (Srcsrv.exe). For technical information about this tool, see SrcSrv.

Using SrcSrv with a Debugger

SrcSrv can be used with WinDbg, KD, NTSD, or CDB.

To use this source server with the debugger, include the text srv* in the source path, followed by the directory specification or UNC path of the source store:


For example:

.srcpath srv*\\myserver\myshare;c:\mylocaldir 

This example also includes a local source path element (c:\mylocaldir). Regardless of whether srv* is the first element in the path or appears later, the source server will always be searched before any other source path elements. If SrcSrv is unable to access the source file or discover its location, the other paths will be searched by the debugger.

If a source file is retrieved by the source server, it will remain on your hard drive after the debugging session is over. Source files are stored locally in the src subdirectory of the home directory (unlike the symbol server, the source server does not specify a local cache in the srv* syntax itself). The home directory defaults to the debugger installation directory; it can be changed by using the !homedir extension or by setting the DBGHELP_HOMEDIR environment variable. If this subdirectory does not already exist, it will be created.

If you use the .open (Open Source File) command to open a new source file through SrcSrv, you must include the -m Address parameter.

For information on how to index your sources, or if you plan to create your own source control provider module, see SrcSrv.

Using AgeStore to Reduce the Cache Size

Any source files downloaded by SrcSrv will remain on your hard drive after the debugging session is over. To control the size of the source cache, the AgeStore tool can be used to delete cached files that are older than a specified date, or to reduce the contents of the cache below a specified size. For details, see AgeStore.

Build machine: CAPEBUILD