aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJulien HENRY <julien.henry@sonarsource.com>2024-05-06 15:47:18 +0200
committerJulien HENRY <julien.henry@sonarsource.com>2024-05-07 13:04:55 +0200
commit3f3dfbe7907f6e2c0efe2d1b2a515db234cb65da (patch)
treea8d6debc1ee06034ffb48e000315fba9a190df01
parente91c405a40ca47533091311f4e4591828260ff5f (diff)
downloadsonar-scanner-cli-3f3dfbe7907f6e2c0efe2d1b2a515db234cb65da.tar.gz
sonar-scanner-cli-3f3dfbe7907f6e2c0efe2d1b2a515db234cb65da.zip
Make debug script set debug option to the forked process
-rwxr-xr-xsrc/main/assembly/bin/sonar-scanner-debug7
-rw-r--r--src/main/assembly/bin/sonar-scanner-debug.bat7
2 files changed, 11 insertions, 3 deletions
diff --git a/src/main/assembly/bin/sonar-scanner-debug b/src/main/assembly/bin/sonar-scanner-debug
index 1a49c84..3c00cc6 100755
--- a/src/main/assembly/bin/sonar-scanner-debug
+++ b/src/main/assembly/bin/sonar-scanner-debug
@@ -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 "$@"
diff --git a/src/main/assembly/bin/sonar-scanner-debug.bat b/src/main/assembly/bin/sonar-scanner-debug.bat
index aeaae59..f811760 100644
--- a/src/main/assembly/bin/sonar-scanner-debug.bat
+++ b/src/main/assembly/bin/sonar-scanner-debug.bat
@@ -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 %*