Locating source
When you debug an application, the debug engine attempts to find the source for the application. If the debug engine can locate the source, it opens the source in the debugger editor. If the debug engine cannot locate the source, it opens a Disassembly view of the source in the debugger editor.
About this task
You can use this method to help the debug engine locate source files:
- In the Debug view or the debugger editor, you can add a source location. For example, Edit Source Lookup opens the Edit Source Lookup Path dialog in which you can select the type of source location to add. Alternatively, you can alter the source location list by right-clicking a stack frame or thread in the Debug view and selecting the Edit Source Lookup action.
Altering the source location list
About this task
After you start a debugging session, you can modify or add to the source location list by completing these steps:
Procedure
Changing the source file in the editor
About this task
If any of the following conditions is true, the debugger
can locate the incorrect source for the current stack frame:
- The source moved.
- You are debugging on a system other than the one on which your program was built.
Procedure
Locating the source file in the editor
About this task
When source cannot be found, the editor opens without source.
To locate the source, do either of these steps:
- To specify a different editor source file name, click Change
Text File. Browse or enter the path and name of the file
that you want to open.Note: To specify a file on your workstation, type the fully qualified path and file name. The ability to change the editor source file depends on the language, environment, and platform on which you are debugging.
- To edit the source lookup path, select Add Source Location. The Edit Source Lookup Path window opens. For instructions for adding a source location, see Altering the source location list.
To open a Disassembly view of the source, click Show Disassembly.