Silverfrost Logo About Us | Contact Us

Debugging programs when the source files have moved

Having the full path of the source files that make up an application has the great advantage that it can be debugged in a directory that does not contain source files. It also means that source files can be located in more than one directory. It does, however, have the disadvantage that if the source files move (either because of a drive mapping change or even debugging the code on a different machine) then the source files cannot be found. The debugger allows you to specify a path (or list of paths) down which the debugger can look if it cannot find a source file in its expected location.

This path can be specified in two different ways:

1. You can use the /SOURCEPATH command line option when running the debugger. This should be followed by the path(s). e.g.

... /SOURCEPATH s:\src;s:\src\nt

Here two paths have been given and they will be searched in order. This option can be shortened to /SP.

2. You can use an MSDOS environment variable called SOURCEPATH that will be used in the absence of a /SOURCEPATH option. e.g.

SET SOURCEPATH=s;\src;s:\src;nt



Copyright © 1999-2017 Silverfrost Limited