-
Notifications
You must be signed in to change notification settings - Fork 57
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
"Apply Code Changes" while debugging? #32
Comments
Currently you can only execute the build command (you may reconfigure it to run the "classes" task which is more quick). If it does not work for you then you have to create a redeploy task in your Gradle script. How would you like this feature to work in general? |
Maybe I should not use the words "Hot Deployment". The application is a Swing GUI application and not a Web project. We are frequently using the "Apply Code Changes" feature in NetBeans to load classes into a running application. This saves time because it takes a long time to start the application and to load needed data. So I was wondering if this is possible (maybe I am missing something) or if this feature is planned for the future. |
I don't think you can currently make "Apply Code Changes" to work. I will have a look at it and see how/if it can be implemented. |
I think this is doable, so I will implement it. Though, probably, I will shamelessly steal code from the Maven plugin :) |
Great! Thanks =) Tell me when it is ready and I test it for you. |
I have experimented how this feature works in the Maven plugin and it seems that the Maven plugin only reloads classes of the currently opened java file (and not every changed file). This is considerably more efficient (and simplier) than checking which files changed. Is it ok with you, if I do the same as the Maven plugin? |
I have implemented this feature (stealing some code from the Maven plugin). Can you build the plugin from the sources and try it? If you don't know how, see the wiki pages. |
It seems to work nicely when I use a generated debug task. It is not working if I create my own gradle debug task. I have to do this since the application is taking an argument. Is it possible to pass along arguments to JavaExec's args property? Thanks for this quick fix! |
It is strange because I don't think this feature relies on the init script the plugin applies to the project. What happens exactly when you apply code changes with your custom debug task? And how is your debug task defined? |
The apply code change button was never activated. I tried the generated debug task with a simple HelloWorld application and it was fine. I then used my own debug task in the real project and it did not work. Now I changed my code to run without arguments, just to see if the generated debug task works better with my project, but it did not. So my problem has do do with something else. I am using subprojects and trying to run one of them. |
DebugUtils.getActiveClassName determines if that button is enabled or not to which the debug task does not matter. It seems as if NetBeans calls |
I will try to debug it or reproduce it in a more simple project. I think I changed files in both the debugged project and in one of the dependencies. I let you know later today or tomorrow. |
When I debugged the plugin with my project it worked! So I reloaded my project in main IDE and it worked there too... So I think we can close this Issue. Thank you! |
I find this plugin very good but I can't get hot deployment to work while debugging.
Is this possible?
The text was updated successfully, but these errors were encountered: