Debugging a Web Application

Use Web page and managed bean breakpoints to debug the Web application.

Prerequisites 

Start EAServer or Tomcat in debug mode.

Optionally, you can enable the JPDA (Java Platform Debug Architecture) interface in EAServer to allow debugging of Java Services that are deployed to the Service Container runtime environment.

Set your JPDA options for EAServer by editing the djc-setenv.bat file located in the DevRuntimes/EAServer/bin subdirectory of your WorkSpace installation. You can edit any of these properties, shown here with there default settings:
set DJC_JPDA=false
set DJC_JPDA_PORT=5005
set DJC_JPDA_SUSPEND=n
set DJC_JPDA_ARGS=


For additional information about these settings, see the EAServer documentation located at the main level of the Sybase WorkSpace online bookshelf. If this server documentation is not installed, the documentation is available on the Sybase Product Manuals Web site at http://sybooks.sybase.com/nav/base.do

You must either run the Web application on Apache Tomcat server, or deploy the Web application to EAServer to execute breakpoints. Tomcat supports both managed bean and Web page breakpoints. EAServer supports managed bean breakpoints.

  1. In the WorkSpace Navigator of the Web Application Development perspective, select the Web application project that you want to debug .
  2. Right-click and select either Debug or Debug as > Debug on Server.
  3. Do one of the following:
    Option Action
    Use an existing server
    1. Select Choose an Existing Server.
    2. Select the server from the Select the server type list box.

      A description of the selected server displays under the list box.

      Note:

      Click the down arrow in View By field to view by Name, Host Name, Vendor, or Version.

    3. (Optional) Select Set Server as Project Default (Do Not Ask Again).
    Define a new server
    1. Select Manually define a new server.
    2. Enter or select Server Host Name.
    3. Select the server type.

      A description of the selected server displays under the list box.

      Note:

      Click the down arrow in View By to view by Name, Host name, Vendor, or Version.

    4. (Optional) Select Set Server as Project Default (Do Not Ask Again).
  4. Do one of the following:
    Option Description
    Debug the Web application project Click Finish and skip to step 5.

    The server starts in debug mode and runs the Web application. The breakpoints you set in managed beans are triggered.

    Add or remove projects that you want to run on the server
    1. Click Next.
    2. Do any of the following:
      • To add a project to run on the server, select an Available project and click Add.
      • To add all projects to run on the server, click Add All.
      • To remove a project from running on the server, select Configured project and click Remove.
      • To remove all projects from running on the server, click Remove All.
    3. Click Finish.

      The server starts in debug mode and runs the Web application. The breakpoints you set in managed beans are triggered.

  5. Review the Web pages in a Web browser and look for breakpoints.
Related concepts
Web Application Development Problems View
Debug and Test
Related tasks
Testing a Web Page
Setting a Breakpoint in a Web Page
Setting a Breakpoint in a Java or EJB Managed Bean
Related reference
Web Application Development Problems View Icons

Send your feedback on this help topic to Sybase Technical Publications: pubs@sybase.com

Your comments will be sent to the technical publications staff at Sybase, Inc. For product-related issues or technical support, contact Sybase Technical Support at 1-800-8SYBASE.