Debugging Arquillian Tests
This short tutorial describes how to debug Arquillian Test Cases using a development environment like Eclipse IDE.
The prerequisite is that you have gone through the basics of Arquillian– you can start from here: Arquillian tutorial
As you already know, Arquillian tests are launched as JUnit test but are executed on the application server environment. Therefore, in order to intercept breakpoints that you have set in Eclipse, you should at first enable remote socket debugging. This can be done by uncommenting the following line from standalone.conf.bat (Windows):
set "JAVA_OPTS=%JAVA_OPTS% -agentlib:jdwp=transport=dt_socket,address=8787,server=y,suspend=n"
Unix users, on the other hand will uncomment the following line in standalone.conf:
JAVA_OPTS="$JAVA_OPTS -agentlib:jdwp=transport=dt_socket,address=8787,server=y,suspend=n"
Remote Profile Testing
If you want to debug your Arquillian Tests against a running JBoss AS instance, start by setting the Active Maven Profile as arq-jbossas-remote (or as you called it in your pom.xml).

Now start WildFly / EAP from Eclipse using the Debug Option, as shown by the following picture:

Now set your breakpoints and execute your application as JUnit Test (Run as->JUnit Test). The Debugger perspective will kick in and you will be able to debug your test.
Managed Profile Testing
If you plan to debug your test using a JBoss AS instance managed by Arquillian, you have to set the remote socket debugging options from within your arquillian.xml file as shown by the following example:
<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/</property>
</engine>
<container qualifier="jboss" default="true">
<protocol type="jmx-as7">
<property name="executionType">REMOTE</property>
</protocol>
<configuration>
<property name="jbossHome">C:\jboss\jboss-as-7.1.1.Final</property>
<property name="javaVmArguments">-agentlib:jdwp=transport=dt_socket,address=8787,server=y,suspend=y</property>
</configuration>
</container>
</arquillian>
Now, set the Maven profile to run against a managed Arquillian profile:

Now set your breakpoints and execute your application as JUnit Test (Run as->JUnit Test). That’s all! Happy debugging!
Recommended Articles
Arquillian Tutorial: Setting Up Jakarta EE Project with Maven
Learn how to set up an Arquillian project for Jakarta EE using Maven. Simplify integration testing with Java middleware.
Customize Arquillian Testing Framework with Custom Server Configuration
Learn how to use a custom standalone.xml file for Arquillian testing with Java and Cloud-Native technologies.
Mastering Arquillian Resource Injection for Efficient Server Resource Management in Java Enterprise Applications
Learn how to leverage Arquillian's @ArquillianResource annotation to expose internal objects like Containers and Deployments in your tests, ensuring efficient server resource management.
Arquillian Integration Testing Framework: A Comprehensive Guide to WAR and JAR Deployments
Master the art of Arquillian integration testing with our in-depth guide. Learn how to create, deploy, and manage WAR and JAR files using the framework.