Debugging EJBs

To debug an EJB:

  1. Open the EJB name.java in the source editor.
  2. Set a breakpoint.
  3. Move the cursor to a line within a method and choose Debug -> Toggle Breakpoint.

    The line in the source editor changes its background color indicating that a breakpoint has been set.

  4. Run the application
  5. Execution stops at the breakpoint, and the line in the source editor is highlighted in another color.

  6. In the IDE, choose Debug -> Step Over any number of times to move through the execution.
  7. Use the Call Stack view to examine and change the value of variables in the method.

    In the Call Stack view, expand the bean.method node to see the variables declared in the method.

    To change a variable's value, select the variable and display its properties. Change the data in the Value field.

  8. In the IDE, choose Debug -> Continue.
  9. When you are finished, remove the breakpoint.

    Move the cursor to the line with the breakpoint and choose Debug -> Toggle Breakpoint. The breakpoint is removed from the line, and its background color resets to the normal editing color.

See also
Debugging the Application
Preparing the Web Module for Debugging
Starting and Stopping the Debugger
Debugging JSP Pages

Legal Notices