Configuring Eclipse for Remote Debugging

Configuring Eclipse for Remote Debugging

In the Debug Configuration frame, specify a name for the debug configuration. Select the project that is to be debugged, namely the EclipseJBoss project previously created in the Eclipse IDE. Select the default value for Connection Type. In the Connection Properties, specify localhost as the Host and specify the Port as the port that was specified in the run batch script of the JBoss server, 8787. Click on the Apply button to add the remote Java application debug configuration, as shown in Figure 13.

JBoss debug configuration
Figure 13. JBoss debug configuration

Next, add exception breakpoints to the JBossServlet.java file. Earlier, we added a NullPointerException to JBossServlet. To add a breakpoint to the servlet class, select Run -> Add Java Exception Breakpoint, as shown in Figure 14.

Adding Java exception breakpoint
Figure 14. Adding Java exception breakpoint

In the Add Java Exception Breakpoint frame, select the NullPointerException, as shown in Figure 15. The NullPointerException breakpoint gets added to the servlet class.

NullPointerException breakpoint
Figure 15. NullPointerException breakpoint

If a NullPointerException is generated in the servlet application in the JBoss server, the application gets suspended and the Debug perspective of the Eclipse IDE displays the exception.

Prev  [1] [2] [3] [4] [5] [6] [7] [8] Next

Close    To Top
  • Prev Article-Java:
  • Next Article-Java:
  • Now: Tutorial for Web and Software Design > Java > Java EE > Java Content
    Photoshop Tutorial
     

    Special Effect

      3D Effect
      Photoshop Articles
    Programming Tutorial
     

    C/C++ Tutorial

      Visual Basic
      C# Tutorial
    Database Tutorial
     

    MySQL Tutorial

      MS SQL Tutorial
      Oracle Tutorial
    Geek Tutorial
     

    Blogging Tutorial

      RSS Tutorial
      Podcasting Tutorial
    Graphic Design Tutorial
      Coreldraw Tutorial
      Illustrator Tutorial
      3D Tutorials
    Webmaster Articles
     

    Domain Service

      Web Hosting
      Site Promotion
    Java Tutorial/ Articles
     

    Java Servlets

      JavaEE Tutorial
     

    JavaBeans Tutorial

    XML Tutorial/ Articles
     

    XML Style

      AJAX Tutorial
      XML Mobile
    Flash Tutorial/ Articles
     

    Flash Video

      Action Script
      Flash Articles
    OS Tutorial/ Articles
      Linux Tutorial
      Symbian Tutorial
      MacOS Tutorial
    Personal Tech
      Hardware Tutorial
      Software Tutorial
      Online Auction