I've tried many times to debug a Test in managed container enviroment.
I get errors like JDWP Transport Error, socket failed to initialize. Means I can not initialize arquillian with the below property tag.
My arquillian.xml file looks like this:
<arquillian xmlns="http://jboss.org/schema/arquillian"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="
http://jboss.org/schema/arquillian
http://jboss.org/schema/arquillian/arquillian_1_0.xsd">
<engine>
<property name="deploymentExportPath">target/arq.deployments</property>
</engine>
<container qualifier="jboss" default="true">
<protocol type="jmx-as7">
<property name="executionType">MANAGED</property>
</protocol>
<configuration>
<property name="javaVmArguments">-Xrunjdwp:transport=dt_socket,address=55407,server=y,suspend=y -Xmx512m -XX:MaxPermSize=128m</property>
</configuration>
</container>
</arquillian>
Am I missing something?
There are 3 JVM running in this case. So this is a special debug case.
So this is the idea, Run test (2nd JVM will be suspended until a JVM is attached to it), then run a new remote configuration, as soon as this starts, the past JVM will run.
It's a bit confusing but works.
Note that if you only have 2 JVM in simple debug mode, you will be debugging arquillian/junit JVM, which is not the one you are interested.