Locating source

When you debug an application, the debug engine finds the source for the application - or you can specify the source location through the debugger user interface. When the debugger cannot find source, you have a variety of options for locating it.

About this task

When the debugger cannot find source, the debugger editor opens without source - however, right inside the editor, you are provided with options for locating the source. One of these options, the Edit Source Lookup Path push button, 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 on a stack frame or thread in the Debug view and selecting the Edit Source Lookup Path action.

Note: For more information about working with source, see the Debug Tool for z/OS® User's Guide.

Altering the source location list

About this task

After you have launched a debug session, you can modify or add to the source location list by completing these steps:

Procedure

  1. Right-click the debug target (or one of its threads or stack frames) and choose Edit Source Lookup Path from the pop-up menu.
  2. In the Edit Source Lookup Path dialog box, perform any of these tasks:
    • To add a source location, click Add. This will invoke the Add Source dialog box, in which you can select the type of source location to add. From the selection list in the Add Source dialog box:
      • Choosing File System Directory will add a local file system directory to the source location list. If desired, subdirectories of this directory will be recursively searched if you select the Search subfolders check box.
      • Choosing Debug engine will cause the debug engine to be added to the source location list.
      • Choosing Debug engine path will cause the path specified on the debug engine to be added to the source location list. When specifying multiple paths, separate them with a semi-colon (;).
        Note: Changes to the Debug engine path setting will take effect in subsequent debug sessions.
    • To remove an existing entry, select a source location and click Remove.
    • To set the order of existing entries, select a source location and click Up or Down to alter that location's placement.
  3. If you want to search for all instances of the source file name in the source location list, select the Search for duplicate source files on the path check box. If you select this check box and the debugger finds multiple instances of the file name, you will be prompted by a dialog box to choose the correct source file.
  4. After you have changed the path, click OK to close the dialog box and have the new path used to find source.

Changing the editor source file

About this task

Sometimes the debugger locates the incorrect source file for the current stack frame in your program, causing incorrect source to be displayed in the editor. When this happens, you can change the text file that opens in the editor by completing the following steps:

Procedure

  1. Right-click inside the editor and select Change Text File from the pop-up menu.
  2. In the Change Text File dialog box field, enter or browse for the path and name of the file that you want to open.
    Note: If you are specifying a file on your local workstation, the fully-qualified path and filename must be entered in this field.
  3. Click OK to load the specified source file in the editor and close the Change Text File dialog box. Alternatively, if you do not want to change the source file, click Cancel.

Results

Source file not found

About this task

When source cannot be found, the editor opens without source. In the editor, you are provided with these options:

  • You can specify a different editor source file name. To do this, choose the Change Text File push button to enter or browse for the path and name of the file that you want to open.
    Note:
    • If you are specifying a file on your local workstation, the fully-qualified path and filename must be entered in this field.
    • The ability to change the editor source file depends on the language, environment, and platform on which you are debugging.
  • You can edit the source lookup path so that it points to the location of the source file. To edit the source lookup path, select the Add Source Location push button. This will invoke the Edit Source Lookup Path dialog box. Instructions for using this dialog box are provided in the preceding altering the source location list section.

Feedback