5 Replies Latest reply on Jul 8, 2013 8:30 AM by Bartosz Majsak

    How to Debug deployed Java App with Arquillian?

    Vitalii Chepeliuk Newbie

      Hi. I was trying to run EAP server with uncommenting

      # Sample JPDA settings for remote socket debugging

      JAVA_OPTS="$JAVA_OPTS -agentlib:jdwp=transport=dt_socket,address=8787,server=y,suspend=n"
      in standalone.conf and then running server manualy with standalone.sh.

      Then was running Arquillian test and application was deployed correctly but problem was If I hit breakpoints inside that classes which are inside WAR file remote debugger is not stopping and application continue to run.

      Example:-------------------------------------------------------------------------------
      It only stops inside method with @Deployment annotation

      @RunWith(Arquillian.class)

      public class DemoArquillianTest {

         @Deployment

         public static Archive<?> deployment() {

            return new WarBuilder().basicWar().build(); << here I can stop it, but after deployment it continue to run without stopping

      }

      @Test

      void test1(){

         int test1= 1;

         Sytem.out.println("first test: " + test1) << if hit breakpoint here debugger doesnt stop

      }

       

      @Test
      void test2(){

         int test2= 2;

         Sytem.out.println("second test: " + test2) << f hit breakpoint here debugger doesnt stop

      }

      -------------------------------------------------------------------------------

      Here is arquillian configuration file
        <container qualifier="eap">

              <configuration>

                  <property name="jbossHome"><path/to/eap></property>

                  <property name="managementPort">9999</property>

                  <property name="serverConfig">standalone.xml</property>

              </configuration>

          </container>

       

      Any help or advise?