Finding source
When you create a launch configuration for debugging a Web object, you can set the default source lookup path for the launch configuration. If a debug session is launched via the launch configuration and the debugger cannot find source in the source lookup path, you can set a new source lookup path. Similarly, if the debugger finds more than one matching source file names, you can set the debugger to prompt you to choose source from a list of the matching source file names.
No source files found
When you are debugging a Web object and its source cannot be found, the Debugger Source Lookup dialog box opens, allowing you to alter the default source lookup path so that source can be found. In this dialog, deselect the Use default source lookup path check box, and do the following to alter the source lookup path:
- To set the order of existing entries, select a source location and click Up or Down.
- To remove an existing entry, select a source location and click Remove.
- To add a source location, click Add Projects, Add JARs, or Add External JARs, as desired, and complete the resulting selection dialog.
- For advanced source location options, such as adding folders and containers to search, click Advanced and complete the resulting dialog.
After you have altered the path as desired, click OK to close the dialog box and have the new path used to find source.
If you choose not to modify the source lookup path and click OK or Cancel, or modify the path and choose Cancel, the debug session will continue, however, source will not be displayed. If source cannot be found and you would prefer not to be prompted for source lookup during the debug session, select the Do not ask again check box and click OK.
Multiple source files found
By default, the debugger will search for source until it reaches the first file name match that is found. If you would like the debugger to search for all possible source file name matches, set this option in the preferences. For information about setting debug preferences, see the related topic below.
Note: Searching for all source file name matches is slower than stopping at the first file name match found.
If the debugger is set to search for all source file name matches, the Debugger Source Selection dialog box opens when multiple files are found. The dialog box displays a list of all files that are found, from which you can choose the correct source to display during the debug session. If the dialog box does not contain the correct source file name, clicking Cancel will close the dialog box and no source will be displayed.
Related tasks
Setting debug preferences
Enabling and disabling step-by-step debug mode
Stepping into methods
Creating a new Java and mixed language debug launch configuration