When you are developing a Web application in a Web project, you
can debug client-side script (such as client-side JavaScriptâ„¢ or VB Script) that is hosted
by Web pages (HTML or JSP pages) in the project.
The easiest way to
debug Web project script is by way of the Debug on Server action.
This action will deploy the Web project to the server for you, and then launch
the debug session. To be able to debug script when working in a Web project,
you must first ensure that script debugging is enabled for server debugging.
You enable script debugging for server debugging in the debug preferences (for further information, see the related
topic). Once you have enabled script debugging, you can launch a debug session
by completing the following steps:
For further information about the debug on server action, search
for 'debug on server' in the online help.
In addition to using the debug
on server action, you can deploy your Web application to the server and then
use the HTML Script Application launch configuration to attach to or launch
the script in the Web application. For information about this launch configuration, see the related
topic.
Note: - Suspending Web project page execution and displaying source: When
you are debugging Web objects that are running on a server (such as JSP pages
that generate script or forms in HTML) and you want to suspend execution for
that script, you need to issue a suspend action on the thread before launching
the script action. If you do not issue a suspend action, the debugger will not halt within
that action, and debugger will not display source for the script. Once you
have suspended execution, selecting the stack frame will result in a display
of the source that is hosted by Microsoft® Internet Explorer. For information
about halting program execution, see the related topic.
- Setting breakpoints in Web project pages: When you are debugging
Web objects that are running on a server, the debugger will display source
as outlined previously. Breakpoints that are set in this source are installed
by the debugger - however, breakpoints that you set in source opened from
your workspace will not be installed. You cannot, therefore, preset breakpoints
in Web project pages.
- When you launch a Web application for debugging, any server-side Web objects
in the application will launch for debugging, as well. These objects will
run in the server test environment, independent of an Active Script debug
session. Terminating a server-side debug session will not affect your Active
Script debug session, and vice-versa.