]> source.dussan.org Git - sonar-scanner-cli.git/commitdiff
Make debug script set debug option to the forked process
authorJulien HENRY <julien.henry@sonarsource.com>
Mon, 6 May 2024 13:47:18 +0000 (15:47 +0200)
committerJulien HENRY <julien.henry@sonarsource.com>
Tue, 7 May 2024 11:04:55 +0000 (13:04 +0200)
src/main/assembly/bin/sonar-scanner-debug
src/main/assembly/bin/sonar-scanner-debug.bat

index 1a49c842431bd78441ad68fd45d5235a3d81b636..3c00cc6931c98023fbf600eccc1e882dcd025c25 100755 (executable)
@@ -9,8 +9,11 @@
 #   SONAR_SCANNER_OPTS - parameters passed to the Java VM when running the SonarScanner
 
 SONAR_SCANNER_DEBUG_OPTS="-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000"
+SONAR_SCANNER_JAVA_DEBUG_OPTS="-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8001"
+SONAR_SCANNER_JAVA_OPTS="$SONAR_SCANNER_JAVA_OPTS $SONAR_SCANNER_JAVA_DEBUG_OPTS"
 
 echo "Executing SonarScanner CLI in Debug Mode"
-echo "SONAR_SCANNER_DEBUG_OPTS=\"-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000\""
+echo "SONAR_SCANNER_DEBUG_OPTS=\"$SONAR_SCANNER_DEBUG_OPTS\""
+echo "SONAR_SCANNER_JAVA_OPTS=\"$SONAR_SCANNER_JAVA_OPTS\""
 
-env SONAR_SCANNER_OPTS="$SONAR_SCANNER_OPTS" SONAR_SCANNER_DEBUG_OPTS="$SONAR_SCANNER_DEBUG_OPTS" "`dirname "$0"`"/sonar-scanner "$@"
+env SONAR_SCANNER_OPTS="$SONAR_SCANNER_OPTS" SONAR_SCANNER_DEBUG_OPTS="$SONAR_SCANNER_DEBUG_OPTS" SONAR_SCANNER_JAVA_OPTS="$SONAR_SCANNER_JAVA_OPTS" "`dirname "$0"`"/sonar-scanner "$@"
index aeaae597aaf31c63c86173e29a17b0574683a9f6..f811760a73dee0f362974cac089ef1734e1f9e8f 100644 (file)
@@ -8,6 +8,11 @@
 
 @setlocal
 @set SONAR_SCANNER_DEBUG_OPTS=-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000
+@set SONAR_SCANNER_JAVA_DEBUG_OPTS=-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8001
+
+@set SONAR_SCANNER_JAVA_OPTS=$SONAR_SCANNER_JAVA_OPTS $SONAR_SCANNER_JAVA_DEBUG_OPTS
+
 echo "Executing SonarScanner CLI in Debug Mode"
-echo "SONAR_SCANNER_DEBUG_OPTS=-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000"
+echo "SONAR_SCANNER_DEBUG_OPTS=%SONAR_SCANNER_DEBUG_OPTS%"
+echo "SONAR_SCANNER_JAVA_OPTS=%SONAR_SCANNER_JAVA_OPTS%"
 @call "%~dp0"sonar-scanner.bat %*