Hi. I’m trying to develop a plugin with an extended set of rules for my project. I have created a plugin based on the sample plugin example. I built it with maven and added it to extensions/plugins folder.
After that I added the following to sonar.properties :
sonar.web.javaAdditionalOpts=-agentlib:jdwp=transport=dt_socket,server=y,suspend=y,address=5005
Running sonarqube ( native instance, no docker image )
./sonar.sh console
Debugger settings:
After attaching a debugger to the process, and the debugger even stops in my plugin’s entrypoint
After which the sonar starts up correctly
And I’m running a sonar scanner.
sonar-scanner -Dsonar.token="<token>" -Dsonar.projectKey=magento2 -Dsonar.sources=. -Dsonar.scanner.debug=true
The analysis went correctly. I can see that my rule worked ( the error appeared after the analysis). But the debugger did not stop at the classes of custom checks.
I also tried to do it with
export SONAR_SCANNER_OPTS="-agentlib:jdwp=transport=dt_socket,server=y,suspend=y,address=8001”
Before starting the scanner, but neither the process on port 5005 nor on port 8001 stops.
Please help(