Note: These pages are being reviewed.
Do I need to restart NetBeans every time to debug new changes?
Q: I am going to develop something on the NetBeans platform, and the question is - do I need to restart NetBeans every time to debug new changes?
For example, I want to enhance the Search dialog. I have built the utilities module (containing SearchPane) using Ant - what is next?
A: You have several options:
Debug Project from the (development) IDE. After making changes - within a method body only! - use Apply Code Changes from the IDE, and they should take effect immediately in the target platform.
Run Project (no need for the debugger). After making changes to code, shut down the platform and Run Project again - the module will be rebuilt and the platform started with your changes in effect.
Run Project. After making changes, select Reload in Target Platform from the project’s context menu in the IDE. This will try to disable the module and reenable the new version. Only works for regular modules (not autoload or eager), and will likely cause mayhem if a lot of other modules depend on this one, so not always feasible.
Install Javeleon in the development IDE. Then use the steps from #3, with the advantages that autoload and eager modules are supported (as of NB 7.2 only), modules with many incoming dependencies work fine, and (like #1 but without its restrictions) any running state is preserved.
Do not run the project; just select Reload in Development IDE from the context menu. Similar to #3 but reloads inside the current IDE, not in a separate target platform.
Procedure #2 is safest. #1 is fine for minor tweaks. #4 basically supersedes #3 if you do not mind using an added tool, and is most convenient when you are making a lot of nontrivial changes in rapid succession. #5 is not recommended except for demos.
Apache Migration Information
The content in this page was kindly donated by Oracle Corp. to the Apache Software Foundation.
This page was exported from http://wiki.netbeans.org/DevFaqModuleReload , that was last modified by NetBeans user Skygo on 2013-12-17T22:36:39Z.
NOTE: This document was automatically converted to the AsciiDoc format on 2018-02-07, and needs to be reviewed.