I read this:
Debugging in Maven?
I'm running intellij remote debug and maven for a service I'm trying to debug.
Preparing to Execute Maven in Debug Mode
Listening for transport dt_socket at address: 8000
^Ctai-m:sb-api-internal-server tai$ m
@REM set MAVEN_OPTS=-Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000
Wow, Maven makes this difficult. Setting
MAVEN_OPTS won't work, because
mvnDebug.bat adds its own afterward, which will override
MAVEN_OPTS. I would copy
myMvnDebug.bat and comment out the line
set MAVEN_DEBUG_OPTS=-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000. That way you can set
MAVEN_DEBUG_OPT on the command line before running it.
C:\somewhere>set MAVEN_DEBUG_OPT=-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8001 C:\somewhere>myMvnDebug.bat