在IntelliJ管理容器中使用Arquillian进行调试 [英] Debugging with Arquillian in IntelliJ - Managed Container

查看:839
本文介绍了在IntelliJ管理容器中使用Arquillian进行调试的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已多次尝试在托管容器环境中调试测试。

I've tried many times to debug a Test in managed container enviroment.

我收到错误,如 JDWP传输错误套接字无法初始化。意味着我无法使用下面的属性标记初始化arquillian。

I get errors like JDWP Transport Error, socket failed to initialize. Means I can not initialize arquillian with the below property tag.

我的arquillian.xml文件如下所示:

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>

我错过了什么吗?

< img src =https://i.stack.imgur.com/vfjiN.jpgalt =Screenshot>

推荐答案

在这种情况下,有3个JVM在运行。所以这是一个特殊的调试案例。

There are 3 JVM running in this case. So this is a special debug case.


  1. 第一个JVM->由Arquillian / Junit开始执行测试。

  2. 第二个JVM- >由Arquillian开始运行托管Jboss。

  3. 第三个JVM->这是一个远程调试配置,必须按顺序移植到JVM
    number 2调试第二个JVM。看看这个博客

  1. 1st JVM-> Started by Arquillian/Junit to perform the tests.
  2. 2nd JVM-> Started by Arquillian to run managed Jboss.
  3. 3rd JVM-> It's a remote debugging configuration that must be ported to JVM number 2 in order to debug 2nd JVM. Check out this blog

所以这就是想法,运行测试(第二个JVM将暂停,直到JVM连接到它),然后运行一个新的远程配置,一旦这开始,过去的JVM就会运行。

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.

这有点混乱但有效。

请注意,如果您在简单调试模式下只有2个JVM,那么您将调试arquillian / junit JVM,这不是您感兴趣的JVM。

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.

这篇关于在IntelliJ管理容器中使用Arquillian进行调试的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆