Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Unable to Debug #55

Open
Lehcim1995 opened this issue Dec 11, 2019 · 8 comments
Open

Unable to Debug #55

Lehcim1995 opened this issue Dec 11, 2019 · 8 comments

Comments

@Lehcim1995
Copy link

Intellij skips my break points when trying to debug my application.

I believe its the same issue as this (unresolved) issue javafx-maven-plugin/javafx-maven-plugin#318

@imlige
Copy link

imlige commented Dec 15, 2019

I want to rise this problem too

@draganbjedov
Copy link

Me too. I'm also interested how to setup this in NetBeans.

@Lehcim1995
Copy link
Author

Lehcim1995 commented Jan 10, 2020

I found a solution here: https://stackoverflow.com/questions/56197372/i-cant-debug-an-application-using-netbeans-11-with-javafx-12/56207033#56207033. it only contains a netbeans solution, but you can also do this for Intellij.

To do it in intellij I added a new maven build with the debug config.
Then i added an remote configuration with the setting from the stackoverflow
Then i added a compound execution to run them both at the same time.

I hope this helps for you guys @imlige and @draganbjedov

@DerMolly
Copy link

DerMolly commented Apr 6, 2020

@Lehcim1995 I'm currently trying to get this to work in IntelliJ.
For me it only works as two separate run configs, which I must run one after the other by hand. Could you maybe share how you got it working?

@Lehcim1995
Copy link
Author

Yes, you need to run 2 different configurations, one for the application and one for the debugger that connects to it. (Intellij does this on the background for normal Java).

As I said in my previous comment, you will need to add a compound (https://www.jetbrains.com/help/idea/creating-compound-run-debug-configuration.html) configuration with both of your configs in it. then you can call that config to start and stop debugging.

@buedi
Copy link

buedi commented Feb 23, 2023

With NetBeans IDE 16 and javafx-maven-plugin 0.0.8, the Run and Debug action button works fine after I import my Maven project.

button action: Run project
Execute Goals: clean javafx:run

button action: Debug project
Execute Goals: clean javafx:run@ide-debug
Set Properties: jpda.listen=true

pom.xml

...
      <plugin>
        <groupId>org.openjfx</groupId>
        <artifactId>javafx-maven-plugin</artifactId>
        <version>0.0.8</version>
        <configuration>
            <mainClass>${mainClass}</mainClass>
            <stripDebug>false</stripDebug>
            <compress>2</compress>
            <noHeaderFiles>true</noHeaderFiles>
            <noManPages>true</noManPages>
            <launcher>hellofx</launcher>
            <jlinkImageName>hello</jlinkImageName>
            <jlinkZipName>hellozip</jlinkZipName>
        </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}</option>
              </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>
...

Can someone please send me similar settings for debugging in Intellij IDEA?

@DawidLokiec
Copy link

Lehcim1995

This doesn't work for me at all, because the execution order of the two separate run configurations within a Compound configuration isn't guaranteed (they run in parallel), but I need to ensure that the JavaFX app launches before the remote JVM debug configuration. So, I'm wondering how you managed to accomplish this? Currently, I manually run the Maven debug configuration first and then the remote JVM debug configuration.

@DawidLokiec
Copy link

@Lehcim1995 I'm currently trying to get this to work in IntelliJ. For me it only works as two separate run configs, which I must run one after the other by hand. Could you maybe share how you got it working?

I have the same problem.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants