3 Replies Latest reply on Oct 7, 2002 4:11 PM by dan1

    How to remote debug a servlet in JBoss

    greencap

      Well I DO know how to start JBoss in debugging mode, but what I am interested to learn is that how can I debug a servlet that bundled inside a WAR or EAR file and copied to the JBOSS_HOME\server\default\deploy folder, using an IDE that is capable of remote debugging for example Netbeans, JBuilder, IntelliJ IDEA.

        • 1. Re: How to remote debug a servlet in JBoss
          chgrimm

          as you said: simply start JBoss in debugging mode.
          i always do with the suspend flag set to "no" and then attach to the jboss-vm after deployment of the ear-file.

          the vm willstop for every breakpoint that you have set in your sourcecode.

          for netbeans this is very simple. just mount the appropriate directories and set your breakpoints and start the remote debugging session.

          beware that you should debug a server only if there's a single user on it. otherwise you will get a total mess.

          • 2. Re: How to remote debug a servlet in JBoss
            prabhakar

            You can also use Eclipse to attach to a running Jboss process and debug your ejbs/servlets.

            -prabhakar

            • 3. Re: How to remote debug a servlet in JBoss
              dan1

              Use the Genuitec JBoss plugin for Eclipse.

              After you set it up and start JBoss from within Eclipse, you can simply compile the code in the project, deploy and set the breakpoints in the code.

              Dan