WAS v8.5 > Troubleshoot

Debug applications


  1. Fire up an IDE like IBM Rational Application Developer and create a project...

      New Project dialog | Java | Java Project | Next | DebugProjName | Finish

  2. Import the recalcitrant application...

      File | Import | File System | /path/to/installedApps/node_name/MyBadApp.ear/MyBadWebApp.war | Finish

  3. Add any JAR files needed to build to the Java Build Path.

    Go to...

      Properties (right-click) | Java Build Path node | Libraries tab | Add External JARs

    ...and add...

      profile_root/installedApps/node_name/MyBadApp.ear/Increment.jar.

  4. Use the Attach Source function to attach the Increment.jar file (which contains both source and class files).

    Click OK when we have added all of the JARs.

    The inspect and display features in the source view do not work if the source has build errors. These features let you select an expression in the source view and evaluate it.

  5. To start debugging, start the WAS in debug mode and make note of the JVM debug port.

    The default value of the JVM debug port is 7777.

  6. When the server is started, switch to the debug perspective by selecting...

      Window | Open Perspective | Debug

    We can also enable the debug launch in the Java Perspective by choosing Window > Customize Perspective and selecting the Debug and Launch checkboxes in the Other category.

  7. Create a new configuration.

      Debug pushbutton | WebSphere Application Server Debug | New

  8. Give your configuration a name and select the project to debug (your new DebugProjName project). Change the port number if you did not start the server on the default port (7777).

  9. Click Debug to start debugging.

  10. Load one of the examples in your browser. For example:

      http://your.server.name:9080/hitcount


Subtopics


+

Search Tips   |   Advanced Search