When debugging a GUI form or JavaFX Application, you can use the Visual Debugger to help you locate the form elements in your source code, set breakpoints and explore component listeners.
To use the Visual Debugger, run the debugger and then take a GUI snapshot of the application UI.
When the debugger is running, expand the Debug menu at the top of the IDE and choose Take GUI Snapshot. The GUI snapshot opens in a tab in the main window.
If you set breakpoints before running the debugger, the Take GUI Snapshot option may be grayed out. In this case Continue (F5) through breakpoints until Take GUI Snapshot is enabled.
When you select a component in the GUI snapshot, the IDE displays the location of the component in the hierarchy tree of components in the Navigator window. The IDE also displays the properties of the selected component in the Properties window.
You can right-click a component in the GUI snapshot and select the following commands in the popup menu. Note that some actions only apply to Java GUI applications and not JavaFX applications.
You need to enable this command in the Java Debugging tab in the Miscellaneous category in the Options window.