Editing and viewing source while debugging

The following editors support debugging active script:

In order to add active script breakpoints, you must use one of the preceding editors when you are debugging or preparing to debug active script.

When you launch an active script debug session, the source editor that opens by default depends on the file type that is opened:

File type Default editor
HTML (.htm or .html) Page Designer
Note:
  • If a stack frame is selected, the HTML Source Page Editor opens.
  • When debugging JSP-generated HTML or an HTML page that was navigated to by form submission, the filename of the source is not available to the Active Script debugger. In this case, the debugger creates a temporary cached source file and the editor does open to display source. If you have previously-set breakpoints in the source of these pages (located in the workbench workspace), these breakpoints cannot be installed by the debugger. To be able to set a breakpoint in this source, suspend (or halt) the debug session before invoking the script that you want to debug. While the debug session is suspended, you can set non-persistent breakpoints for the page. For information about non-persistent breakpoints (or breakpoints that are set in the temporary cached source outside of the workbench workspace), refer to the setting a line breakpoint topic.
JSP (.jsp) Page Designer
Note:
  • If a stack frame is selected, the HTML Source Page Editor opens.
  • When debugging a JSP page, the filename of the source is not available to the Active Script debugger. In this case, the debugger creates a temporary cached source file and the editor does open to display source. If you have previously-set breakpoints in the source of these pages (located in the workbench workspace), these breakpoints cannot be installed by the debugger. To be able to set a breakpoint in this source, suspend (or halt) the debug session before invoking the script that you want to debug. While the debug session is suspended, you can set non-persistent breakpoints for the page. For information about non-persistent breakpoints (or breakpoints that are set in the temporary cached source outside of the workbench workspace), refer to the setting a line breakpoint topic.
JavaScript (.js) JavaScript Editor
VisualBasic (.vbs) HTML Source Page Editor

In the editors, you can perform various debug actions by way of pop-up menu. You will want to set a different editor for debugging script for the following reasons:

To set a specific editor to open for a file type:

  1. Select Window > Preferences from the workbench menu bar to open the Preferences dialog box.
  2. In this dialog box, choose Workbench > File Associations to open the File Associations page.
  3. In the File types section, select the type of file that you are debugging. If the file type does not display in the list, click Add to add the file type.
  4. In the Associated editors section, click Add to open the Editor Selection dialog box.
  5. In this dialog box, ensure that the Internal Editors radio button is selected and choose the editor that you want to associate with the file type from the list.
  6. Click OK to set the associated editor for the file type that you selected.
  7. Click OK to close the Preferences dialog box.

After completing the preceding steps, when you open the file type to view its source, the selected editor will be used.

Related concepts
Active Script debugger overview
Related tasks
Debugging Web project script
Debug on Server
Debugging an HTML Script Application
Setting debug preferences
Halting a running program
Using breakpoints
Setting a line breakpoint
Enabling and disabling breakpoints
Removing breakpoints
Terms of use | Feedback
(C) Copyright IBM Corporation 2003, 2005. All Rights Reserved.