MAVEN_OPTS和CATALINA_OPTS的作用

MAVEN_OPTS=-Xdebug -Xrunjdwp:transport=dt_socket,address=1044,server=y,suspend=n

CATALINA_OPTS=-server -Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=8787

他们的目的都是一样的,就是远程调试。无非一个是maven的远程调试,一个是tomcat的远程调试。
更具体的说明如下,以MAVEN_OPTS为例:

After setting this property, run "maven cactus:test" (or whatever goal to debug) and it will block, waiting for a debug connection.

Then, in your IDE, select the "Run -> Debug" window and create a new "Remote Java Application" configuration, passing the port set in MAVEN_OPTS (8787 in this case).

Once running this configuration in debug, the blocked Maven session will continue, enabling debugging from your IDE.

你可能感兴趣的:(杂项)