Previous Next vertical dots separating previous/next from contents/index/pdf

Step 4: Debug the Application

The debugger in the Workshop Studio products is an extension of the Eclipse debugger to allow JSP debugging. In this step, we will set a break point in our JSP and see how you can debug JSPs as easily as Java files.

The tasks in this step are:

Set a Breakpoint

The Design/Source editor shows you when HTML tags are mismatched or badly formed. However if you have errors in the JSP, you may want to debug your file with standard debugging tools. Workshop Studio extends the Eclipse debugger to allow you to debug JSP code.

To set a breakpoint:

  1. Click in the gutter of the source editor for the JSP to set a breakpoint.
  2. In this case, we have only two lines of JSP, so set breakpoints on both lines.

Debug the JSP

To debug the application

  1. Right click on the file name in the AppXplorer view. From the menu, choose Debug As > Debug on Server. The process is the same as for running an application.

    Note that since the server was started before in non-debug mode, you will be prompted to restart the server. Click OK to restart in Debug mode.

  2. The application starts to run. When it hits a breakpoint, it switches to Debug perspective automatically and you can proceed as for a normal debugging session, viewing variable values, stepping through, etc.

Click the arrow below to navigate through the tutorial:

 

Skip navigation bar   Back to Top