2 Replies Latest reply on Aug 12, 2005 6:42 AM by Tremal Naik

    Jboss debugging

    Tremal Naik Newbie

      Hello, is it possible running jboss from Eclipse, using the source package, to let me debugging it, i.e. defining breakpoints throught its java files?

      Thanks

        • 1. Re: Jboss debugging
          jaikiran pai Master

          Ya its possible. You will have to edit the run.bat file(for windows) as follows:

          Place the following line in run.bat(Its already present, you actually have to
          remove the rem word at the start of the line):

          set JAVA_OPTS=-classic -Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_socket,address=8787,server=y,suspend=n %JAVA_OPTS%


          In your eclipse, select the drop down of the Debug icon. Then click on Debug...
          Then click on Remote Java Application in the Configurations window. Then click on New button. In the connection properties, mention the Host as localhost and port as 8787. Then click on Debug button. Thats it



          • 2. Re: Jboss debugging
            Tremal Naik Newbie

            I think you misunderstood what my need was, probabily I was not suffiecntly clear. The step you suggest was to enable remote debugging, to read debugging (i.e. log4j) infos from a remote server.
            What I need is a way to let me step through jboss source code, defining Eclipse debugger breakpoints into the java files.
            Anyway I figured out at last, the steps follow if someone may find it useful.

            1) Download the last jboss (already compiled) server and extract to your HD
            2) Download the same server version source code and extract to your HD
            3) Create a java project in Eclipse, pointing to the source folder. Don't need to build the project
            4) Configure a running server configuration in the Jboss IDE plugin for Eclipse pointing to the compiled jboss folder
            5) Open the configuration for the jboss server and add the newly created jboss source project. Maybe you don't need to create the project as in point 3, may be sufficient adding the jboss source folder. I didn't try anyway.

            Now define a breakpoint (in a piece of code you're sure it's executed) and see if it works for you.

            Thanks,