javafx-maven-plugin
javafx-maven-plugin copied to clipboard
Breakpoint debugging does not work with IntelliJ IDEA
Debugging with NetBeans IDE works without problems, but I can't get any further with the intellij IDEA This problem is similar to Issue 55 has anyone found a working workaround in combination with Intellij IDEA? Please tell me the settings.
With Intellij I used exactly the same settings like NetBeans maven cofiguration: clean javafx:run@ide-debug
with java options / Properties: jpda.listen=true
the plug in is cofiguresd in this way:
`
<groupId>org.openjfx</groupId>
<artifactId>javafx-maven-plugin</artifactId>
<version>0.0.8</version>
<configuration>
<mainClass>${mainClass}</mainClass>
</configuration>
<executions>
<execution>
<!-- Default configuration for running -->
<!-- Usage: mvn clean javafx:run -->
<id>default-cli</id>
</execution>
<execution>
<!-- Configuration for manual attach debugging -->
<!-- Usage: mvn clean javafx:run@debug -->
<id>debug</id>
<configuration>
<options>
<option>-agentlib:jdwp=transport=dt_socket,server=n,suspend=y</option>
</options>
</configuration>
</execution>
<execution>
<!-- Configuration for automatic IDE debugging-->
<id>ide-debug</id>
<configuration>
<options>
<option>-agentlib:jdwp=transport=dt_socket,server=n,suspend=n,address=${jpda.address}
</options>
</configuration>
</execution>
<execution>
<!-- Configuration for automatic IDE debugging-->
<id>intellij-debug</id>
<configuration>
<options>
</options>
</configuration>
</execution>
<execution>
<!-- Configuration for automatic IDE profiling -->
<id>ide-profile</id>
<configuration>
<options>
<option>${profiler.jvmargs.arg1}</option>
<option>${profiler.jvmargs.arg2}</option>
<option>${profiler.jvmargs.arg3}</option>
<option>${profiler.jvmargs.arg4}</option>
<option>${profiler.jvmargs.arg5}</option>
</options>
</configuration>
</execution>
</executions>
</plugin>
`
after pressing the debug buttton I getting a error :
` "C:\Program Files\Eclipse Adoptium\jdk-17.0.6.10-hotspot\bin\java.exe" -agentlib:jdwp=transport=dt_socket,address=127.0.0.1:7906,suspend=y,server=n -Dmaven.multiModuleProjectDirectory=C:\DEVELOPMENT\SCENIC\mavenFXDemo -Djansi.passthrough=true "-Dmaven.home=C:\Program Files\apache-maven-3.6.3" "-Dclassworlds.conf=C:\Program Files\apache-maven-3.6.3\bin\m2.conf" "-Dmaven.ext.class.path=C:\Program Files\JetBrains\IntelliJ IDEA Community Edition 2022.3\plugins\maven\lib\maven-event-listener.jar" -javaagent:C:\Users\user\AppData\Local\JetBrains\IdeaIC2022.3\captureAgent\debugger-agent.jar -Dfile.encoding=UTF-8 -classpath "C:\Program Files\apache-maven-3.6.3\boot\plexus-classworlds-2.6.0.jar;C:\Program Files\apache-maven-3.6.3\boot\plexus-classworlds.license;C:\Program Files\JetBrains\IntelliJ IDEA Community Edition 2022.3\lib\idea_rt.jar" org.codehaus.classworlds.Launcher -Didea.version=2022.3.2 -Djpda.listen=true clean javafx:run@ide-debug Connected to the target VM, address: '127.0.0.1:7906', transport: 'socket' [INFO] Scanning for projects... ...
[INFO] --- javafx-maven-plugin:0.0.8:run (ide-debug) @ mavenFXDemo --- [WARNING] Module name not found in <mainClass>. Module name will be assumed from module-info.java ERROR: transport error 103: invalid port number specified ERROR: JDWP Transport dt_socket failed to initialize, TRANSPORT_INIT(510) JDWP exit error AGENT_ERROR_TRANSPORT_INIT(197): No transports initialized [s\src\jdk.jdwp.agent\share\native\libjdwp\debugInit.c:734] [ERROR] Command execution failed. org.apache.commons.exec.ExecuteException: Process exited with an error: 2 (Exit value: 2) at org.apache.commons.exec.DefaultExecutor.executeInternal (DefaultExecutor.java:404) ... `
I done a nother try with following settings
maven cofiguration: clean javafx:run@intellij-debug
with java options / Properties: jpda.listen=true -agentlib:jdwp=transport=dt_socket,server=n,suspend=n,address=${jpda.address}
I can start the application with no problems, but only exception breakpoints work with the Intellij IDEA (no line breakpoints)
"C:\Program Files\Eclipse Adoptium\jdk-17.0.6.10-hotspot\bin\java.exe" -agentlib:jdwp=transport=dt_socket,address=127.0.0.1:7998,suspend=y,server=n -Dmaven.multiModuleProjectDirectory=C:\DEVELOPMENT\SCENIC\mavenFXDemo -Djansi.passthrough=true "-Dmaven.home=C:\Program Files\apache-maven-3.6.3" "-Dclassworlds.conf=C:\Program Files\apache-maven-3.6.3\bin\m2.conf" "-Dmaven.ext.class.path=C:\Program Files\JetBrains\IntelliJ IDEA Community Edition 2022.3\plugins\maven\lib\maven-event-listener.jar" -javaagent:C:\Users\user\AppData\Local\JetBrains\IdeaIC2022.3\captureAgent\debugger-agent.jar -Dfile.encoding=UTF-8 -classpath "C:\Program Files\apache-maven-3.6.3\boot\plexus-classworlds-2.6.0.jar;C:\Program Files\apache-maven-3.6.3\boot\plexus-classworlds.license;C:\Program Files\JetBrains\IntelliJ IDEA Community Edition 2022.3\lib\idea_rt.jar" org.codehaus.classworlds.Launcher -Didea.version=2022.3.2 -Djpda.listen=true "-D-agentlib:jdwp=transport=dt_socket,server=n,suspend=n,address=${jpda.address}" clean javafx:run@intellij-debug Connected to the target VM, address: '127.0.0.1:7998', transport: 'socket' [INFO] Scanning for projects...
No errors on startup but kine brakepoints are not working. When I pressing the "Stop debugging button" it disconect the socket communication like expected
Disconnected from the target VM, address: '127.0.0.1:7998', transport: 'socket' Process finished with exit code 130
but the application is still running.
Please let me know if anyone has workaround settings for debugging Intellij IDEA