When a program is built with debugging enabled the debugging information contains paths describing where the source files that went into the program are located in order to allow the debugger to find them. If a program or libraries linked into the program are being run on a different machine to the one they were compiled on or if the source files have moved since the program was compiled, the debugger will unable to find the source files.

In this situation the simplest way to help CrossStudio find the moved source files is to add the directory containing the source file to one of it’s source file search paths. Alternatively, if CrossStudio cannot find a source file it will prompt you for it’s location and record it's new location in its source file map.

## Debug source file search paths

The debug source file search paths can be used to help the debugger locate source files that are no longer in the same location as they were at compile time. When a source file cannot be found, the search path directories will be checked in turn to see if they contain the source file. CrossStudio maintains two debug source file search paths:

- Project session search path This path is set in the current project session and does not apply to all projects.
- The global search path This path is set system wide and applies to all projects.

The project session search path is checked before the global search path.

###### To view and edit the debug search paths

- From the Debug menu, click Edit Search Paths

## Debug source file map

If a source file cannot be found whilst debugging and the debugger has to prompt the user for its location, the results are stored in the debug source file map. The debug source file map is simply a mapping between the original file name and its new location. When a file cannot be found at its original location or in the debug search paths the debug source file map is checked to see if a new location for the file has been recorded or if the user has specified that the file does not exist. Each project session maintains its own source file map, the map is not shared by all projects.

###### To view the debug source file map

- From the Debug menu, click Edit Search Paths

###### To remove individual entries from the debug source file map

- From the Debug menu, click Edit Search Paths
- Right click on the mapping you want to delete
- From the context menu, click Delete Mapping

###### To remove all entries from the debug source file map

- From the Debug menu, click Edit Search Paths
- Select Delete All Mappings from the context menu