Starting a Java Server-Side Component Debugging Session

   

To debug a Java server-side component

  1. Start Visual J++.

  2. On the File menu, click Open Project.

  3. On the Existing tab of the Open Project dialog box, select your server-side component project.

  4. In Project Explorer, expand your project’s node, and double-click your component’s .java file to load it into the Text editor.

  5. On the Debug menu, click Processes to display the Processes dialog box.

  6. In the Processes section of the dialog box, select Microsoft Active Server Pages.

  7. Click Attach.

    This puts your project in run mode and loads the debugger.

  8. From within the Text editor, set a breakpoint within a public method of your component’s class.

  9. From Internet Explorer, set a breakpoint after the script calls the server-side component in your .asp page.

  10. From Internet Explorer, click Refresh.

    The scripting code calls the component and breaks on the line where you’ve set the breakpoint.

The environment and your project are now ready for you to continue debugging your component with the debugger’s windows and general features for setting breakpoints, stepping through code, and continuing after an error. See the topics in Basic Debugging Procedures and the tables in The Debugging Process for a list of these features and their supporting documentation.