anchor.diff:  if not %DEBUG_ARG% == "" (
      if x%DEBUG_ARG:-=%==x%DEBUG_ARG% (
         shift
  -      set DEBUG_PORT=%DEBUG_ARG%
  +      set DEBUG_PORT_VAR=%DEBUG_ARG%
      )
      shift
      goto READ-ARGS
  
positive.code: echo.
  
  :RESTART
  rem if x%XLOGGC% == x (
    "%JAVA%" %JAVA_OPTS% ^
     "-Dorg.jboss.boot.log.file=%JBOSS_LOG_DIR%\server.log" ^
     "-Dlogging.configuration=file:%JBOSS_CONFIG_DIR%/logging.properties" ^
        -jar "%JBOSS_HOME%\jboss-modules.jar" ^
        %MODULE_OPTS% ^
        -mp "%JBOSS_MODULEPATH%" ^
         org.jboss.as.standalone ^
        "-Djboss.home.dir=%JBOSS_HOME%" ^
         %SERVER_OPTS%
  rem ) else (
    rem "%JAVA%" -Xloggc:%XLOGGC% %JAVA_OPTS% ^
     rem "-Dorg.jboss.boot.log.file=%JBOSS_LOG_DIR%\server.log" ^
     rem "-Dlogging.configuration=file:%JBOSS_CONFIG_DIR%/logging.properties" ^
        rem -jar "%JBOSS_HOME%\jboss-modules.jar" ^
        rem %MODULE_OPTS% ^
        rem -mp "%JBOSS_MODULEPATH%" ^
        rem org.jboss.as.standalone ^
        rem "-Djboss.home.dir=%JBOSS_HOME%" ^
        rem %SERVER_OPTS%
  rem )
  
  if ERRORLEVEL 10 goto RESTART
  
  
negative.code: )
  
  if NOT "x%DEBUG_PORT%" == "x" (
    set DEBUG_PORT_VAR=%DEBUG_PORT%
  )
  
  if NOT "x%GC_LOG%" == "x" (
    set "GC_LOG=%GC_LOG%
  )
  
  rem Set debug settings if not already set
  if "%DEBUG_MODE%" == "true" (
     echo "%JAVA_OPTS%" | findstr /I "\-agentlib:jdwp" > nul
    if errorlevel == 1 (
       set "JAVA_OPTS=%JAVA_OPTS% -agentlib:jdwp=transport=dt_socket,address=%DEBUG_PORT_VAR%,server=y,suspend=n"
    ) else (
       echo Debug already enabled in JAVA_OPTS, ignoring --debug argument
    )
  