Updated remote vm debug command-line options

This commit is contained in:
dragonmacher 2021-03-23 13:45:33 -04:00
parent 1b36a099f4
commit ca2a6bbb0a
5 changed files with 30 additions and 19 deletions

View file

@ -151,12 +151,10 @@ if [ "${MODE}" = "debug" ] || [ "${MODE}" = "debug-suspend" ]; then
if [ "${MODE}" = "debug-suspend" ]; then
SUSPEND=y
fi
VMARG_LIST+=" -Xdebug"
VMARG_LIST+=" -Xnoagent"
VMARG_LIST+=" -Djava.compiler=NONE"
VMARG_LIST+=" -Dlog4j.configuration=\"${DEBUG_LOG4J}\""
VMARG_LIST+=" -Xrunjdwp:transport=dt_socket,server=y,suspend=${SUSPEND},address=${DEBUG_ADDRESS}"
VMARG_LIST+=" -agentlib:jdwp=transport=dt_socket,server=y,suspend=${SUSPEND},address=${DEBUG_ADDRESS}"
elif [ "${MODE}" = "fg" ]; then
:

View file

@ -123,7 +123,7 @@ if "%JAVA_HOME%" == "" (
rem reestablish JAVA path based upon final JAVA_HOME
set "JAVA=%JAVA_HOME%\bin\java.exe"
:: set DEBUG=-Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=*:18888
:: set DEBUG=-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=*:18888
if "%OPTION%"=="console" (
start "%APP_LONG_NAME%" "%JAVA%" %DEBUG% -jar "%WRAPPER_HOME%/wrapper.jar" -c "%WRAPPER_CONF%"

View file

@ -136,11 +136,8 @@ if "%DEBUG%"=="y" (
set DEBUG_ADDRESS=127.0.0.1:18001
)
set VMARG_LIST=!VMARG_LIST! -Xdebug
set VMARG_LIST=!VMARG_LIST! -Xnoagent
set VMARG_LIST=!VMARG_LIST! -Djava.compiler=NONE
set VMARG_LIST=!VMARG_LIST! -Dlog4j.configuration="!DEBUG_LOG4J!"
set VMARG_LIST=!VMARG_LIST! -Xrunjdwp:transport=dt_socket,server=y,suspend=!SUSPEND!,address=!DEBUG_ADDRESS!
set VMARG_LIST=!VMARG_LIST! -Dlog4j.configuration="!DEBUG_LOG4J!"
set VMARG_LIST=!VMARG_LIST! -agentlib:jdwp=transport=dt_socket,server=y,suspend=!SUSPEND!,address=!DEBUG_ADDRESS!
goto continue3
)

View file

@ -179,10 +179,18 @@ def initTestJVM(Task task, String rootDirName) {
'-Djdk.attach.allowAttachSelf',
'-javaagent:' + jmockitPath,
'-DLock.DEBUG=true',
'-Xdebug',
'-Xnoagent',
'-Djava.compiler=NONE',
'-Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=' + debugPort
'-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=' + debugPort
// Note: modern remote debug invocation;
// -agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=8000
//
// We removed these lines, which should not be needed in modern JVMs
// -Xdebug
// -Xnoagent
// -Djava.compiler=NONE
// -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=8000
}
}
/*********************************************************************************

View file

@ -347,10 +347,18 @@ def initTestJVM(Task task, String rootDirName) {
'-Djdk.attach.allowAttachSelf',
'-javaagent:' + jmockitPath,
'-DLock.DEBUG=true',
'-Xdebug',
'-Xnoagent',
'-Djava.compiler=NONE',
'-Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=' + debugPort
'-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=' + debugPort
// Note: modern remote debug invocation;
// -agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=8000
//
// We removed these lines, which should not be needed in modern JVMs
// -Xdebug
// -Xnoagent
// -Djava.compiler=NONE
// -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=8000
}
}