Before you debug an application, define a server and add the project to the server, as described below for the servers that are supported:
Once your server is defined, to debug an application, choose Run > Debug. The following dialog is displayed.
- Choose the server from the list of defined servers under J2EE Server.
- Choose the project to debug. Note that you can debug only one application at a time on a given server.
- Click Apply to save changes.
- Click Debug to start the server and run the application.

Once the debugger launches, Debug perspective will open.
Extended Debugger Features
For information on using the Eclipse debugger, consult Help > Help Contents > Java Development User Guide. The Workshop Studio family of products extends the Eclipse debugger to provide the following additional features.
JSP Variables View
The JSP Variables view shows the variables accessible by this page regardless of their origin (JSP page, Struts action, and so forth). This saves you time looking for the variables you are using in the page in the application server-specific maps!
It has five categories:
- Available variables
These are the variables used by the page. The JSP Variables view can display also the variables which have not been initialized yet. To enable this feature unselect the Show Initialized Only menu item from the pull down menu.
- Page attributes
Page context attributes
- Request attributes
Request context attributes
- Session attributes
Session context attributes
- Application attributes
Application context attributes
JSP Breakpoints
The JSP breakpoints can be added, removed, enabled or disabled from the vertical ruler of the Workshop editor either by double-clicking on a line or by using the context menu.
JSP breakpoints can be set at the following locations:
- JSP custom tags.
- Most of the JSP action and scripting elements .
- Scriptlets containing Java code.
- EL expression (if supported by the server) .
JSP Stepping
The JSP debugger can step through the JSP source or through the server generated Java source. In JSP mode the stepping commands are declared as follows:
Step Over
The JSP debugger will step over the following elements:
- JSP custom tags
- Most of the JSP action and scripting elements
- Scriptlets containing Java code
- EL expression (if supported by the server)
Step Into
The JSP debugger will step into the following elements:
- JSP custom tag - steps directly into the custom tag implementation. It might be a Tag file or a Java source file.
- <jsp:include> - steps into the file pointed by the page attribute.
- <jsp:forward> - steps into the file pointed by the page attribute.
- <jsp:invoke> - steps into the fragment code.
- <c:import> - steps into the file pointed by the url attribute.
- EL function - steps into the Java source of the function.
- Java scriptlet - steps into the Java source like the standard Eclipse debugger
Step Return
Step return works exactly like the Java equivalent.
The server generated Java source behind the JSP page can be seen by selecting the "Show Java Source" inside the Debug View pull down menu. When in the mode the debugger steps over the Java lines.
Related Topics
Running an Application