Depending on the product with which you are using the JavaScript™ debug
adapter, different editors are available for viewing or working with your JavaScript source.
These editors offer different sets of debug-related functionality.
For example, if you are debugging JavaScript using a Rational® product
such as Rational Application
Developer, or a WebSphere® Studio
product such as WebSphere Studio
Application Developer, the default editor that is associated with JSP files
is Page Designer. This editor provides syntax highlighting for executable JavaScript code
and the ability to set breakpoints inside of JavaScript blocks from within the
editor. If you are debugging JavaScript and using the Debugger
editor, you can set line breakpoints from the editor but syntax highlighting
for executable JavaScript is not available.
Breakpoints
can be set in JSP files within the following tags:
- JSP scriptlets of the form: <% %>
- JSP expressions of the form: <%= %>
- JSP declarations of the form: <%! %>
- jsp:useBean, jsp:getProperty, and jsp:setProperty tags
- Custom tag handlers (in the Java™ code)
Breakpoints cannot be set for the following tag sets:
- HTML code
- JSP directives
- All other standard JSP tags (jsp:include, jsp:forward, etc.)
- Custom tags
To choose an editor, complete the following steps:
- Select Window > Preferences from the workbench
menu bar to open the Preferences dialog box.
- In this dialog box, choose Workbench > File Associations to
open the File Associations page.
- In the File types section, select the type of
file that you are debugging (for example, *.jsp).
If the file type is not displayed in the list, click Add to
add the file type.
- In the Associated editors section, click Add to
open the Editor Selection dialog box.
Note: The
list of available editors varies depending on the product that you are using.
- In this dialog box, ensure that the Internal Editors radio
button is selected and choose the editor that you want the file type to be
associated with (for example, the Debugger Editor).
- Click OK to set the selected editor as the associated
editor for the file type that you selected.
- If you want the selected editor to be marked as the default editor, select
the editor in the list and click Default.
- Click OK to close the Preferences dialog
box.
After completing these steps, when you open the file type to view
its source, the editor (and any debug editor actions associated with it) that
you specified will be available.