I have Java EE project in which I use **Arquillian** tests with JUnit on **JBoss 7** (Windows). Tests are working fine however I cannot debug them.

From what I've googled (<https://community.jboss.org/wiki/WhyDontBreakPointsWorkWhenDebugging>) I understand that Arquillian tests are being run in separate VM therefore IntelliJ cannot debug them. I need IntelliJ to connect to that machine remotely over socket but I dont know how to do it.

I found this thread: [Debugging with Arquillian in IntelliJ - Managed Container](https://stackoverflow.com/questions/14522734/debugging-with-arquillian-in-intellij-managed-container) However I dont know how to get it work.

Also I stepped over this thread: <http://devnet.jetbrains.com/message/5253623?tstart=0> so I filled hopefully appropriet surefire part in my pom.xml but it didnt help:

```
<plugin>
    <artifactId>maven-surefire-plugin</artifactId>
        <version>2.4.3</version>
        <configuration>
            <debugForkedProcess>true</debugForkedProcess>
        <skip>false</skip>
    </configuration>
 </plugin>

```

Could anyone guild me please how to debug tests in such configuration?