我这样固定。
<plugins> <plugin> <groupId>org.prehaus.cargo</groupId> <artifactId>cargo-maven2-plugin</artifactId> <version>1.4.19</version> <configuration> <container> <containerId>tomcat8x</containerId> </container> <configuration> <type>standalone</type> <properties> <cargo.servlet.port>8080</cargo.servlet.port> <cargo.jvmargs> -Xmx2048m -Xms512m -Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=9009 -Xnoagent -Djava.compiler=NONE </cargo.jvmargs> </properties> </configuration> <deployer> </deployer> <deployables> <deployable type="war" file="target/spa.war"></deployable> </deployables> </configuration> </plugin>
我通过更改地址来使用另一个端口。
-Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=9009
I then created an IntelliJ run config for a remote by going to.
Run > EditConfigurations > + > RemoteI configured the remote to go to localhost and
the port I had previously chosen <9009>.
完成此操作后,我可以开始运行货物,然后作为一个单独的过程启动调试器以启用调试。
如果需要,可以将suspend参数更改为no。
-Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=9009
然后,无需运行调试器即可开始构建货物。



