How to debug JavaFX


Question

I've just started working with javafx, it seems cool and NetBeans seems much more fun than Eclipse but I find it impossible to debug my application. I've added breakpoints, and I pressed the debug button, I see the debugger is registered to some port but it doesn't cause the application to start.

When I run the application and attach a debugger nothing seems to happen. This is extremely annoying since I am using an external library I've added to my project, and I can't edit its content (since I am getting 'java file cannot be locked as it is read only').

I am very new to java and especially javafx, thank you for your help I sure need it:)

1
1
8/23/2009 7:55:25 PM

Accepted Answer

First off, I'd start with downloading the latest version of NetBeans (6.7.1 as of today). Second, NetBeans will let you put breakpoints in places that don't make sense for the language. You're best off putting breakpoints in a function like the run() function and stepping from there.

One more thing: make sure you have your JavaFX project set as the main project if you use that Debug button since I believe that it acts on your main project only.

1
8/25/2009 3:23:55 PM

Licensed under: CC-BY-SA with attribution
Not affiliated with: Stack Overflow
Icon