-
Notifications
You must be signed in to change notification settings - Fork 9
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
Restart (r) in dev mode kills the debugging session #498
Comments
André, thank you for your feedback in reporting this issue. Like you noted, there are actually a few separate issues:
In general though we haven't thought of the lack of a Restart operation as too much of a priority, since there is the alternative of simply doing a Stop, waiting, and then doing a new Start (Run/Debug etc.). In our view, the time spent in restarting dev mode mostly consists of the time spent starting the server and the app within the server. (This is especially true since there were some enhancements in Liberty runtime v23.0.0.8 such that the install feature step happens much more quickly when the features are already installed). By that line of thinking, there's not much extra overhead to restart dev mode, vs. trying to just restart the Liberty server within dev mode (the latter is what you'd do by typing the '(r)' which you originally noted). Of course, one operation (restart) would always be more convenient than two (stop/start). But besides that, I'm curious if you basically agree with that assessment, in your experience, or if you have any further thoughts here. But beyond the first two issues I listed at the start of this comment, the third deserves consideration on its own. Another data point here is the fact that the earlier 23.0.9 release our support was a little smoother in this type of use case. Previously, when we were still generating a Remote Java App-typed Debug config, you could simply "re-launch" and the debugger config would connect to the newly (restarted) Liberty server. Now that in 23.0.12, where we've streamlined Debug to use a single Liberty Tools-typed Debug config, there's no way to only "relaunch" the debug without relaunching the whole underlying dev mode as well.. and so this isn't an option. (I'm actually not sure exactly how you ended up with a separate port during your restart but perhaps you did something along these lines.) It would be nice if there was something like a "Reconnect" option. I.e. don't re-launch dev mode, just take the Debugger portion and reconnect and launch a new Debugger session without a whole new Liberty Tools launch. I'm not sure how to go about this though, but we can keep this issue open to consider. Let me wrap up by saying there is a lot there, and I don't expect you to respond to all that, but please do share a bit about your use case if you can, as requested. Thanks again for your feedback on the tooling. |
Hello Scott, First let me correct my mistake, you're totally right, the port number now remains the same after a restart. As the general user experience on the reconnect to debugging session, i was thinking that maybe a solution would be to drive all the commands through the liberty dashboard (as yes, restart devmode or restart liberty within dev mode is very similar). What do you think about that? |
OK, thanks for clarifying. No need to apologize.
I appreciate your suggestion, but after thinking about it I feel it's better to think of the dev mode keyboard commands as a bit distinct from the Liberty Dashboard operations. E.g. consider restart. If we were to try to simply expose the existing keyboard commands through the dashboard we would have some kind of restart that would restart just the server, within dev mode. I think though that it'd be actually more useful to have a dashboard operation to restart dev mode (mvn) itself. Even if I'm wrong, I think it shows having 1-1 similar commands isn't obviously the best. You mention "consistency". I think perhaps it is just a bit unusual to interact via the Terminal at the same time as interacting with the dashboard. One thing I don't like about Terminal is that once it gets control the Eclipse shortcuts aren't usable (not to mention Ctrl+C doesn't do copy). Not sure there's an easy answer here just appreciating the point here.
I just want to make sure you're aware that you can, in the terminal view, click on URLs to open in a browser. You just have to press the Question on the impactSo let me ask, having had this discussion, how big of an impact does the lack of a restart operation feel like, to you? Does it seem OK to do stop then start again, yourself, as two operations? Or does that seem mildly annoying? I'm guessing it's probably not too big a deal to work around but does it feel at all consequential here? Thanks again for your feedback. |
Hello @scottkurz, Thank you for the tip, it also works on mac (Command + click). Well the most annoying is the lack of capability to reconnect to the debugger. There is also one case i should probably mention, when the hot swapping fails, eclipse will popup and ask for a terminate, restart, ignore. Of course in that case also the restart will have to be done twice to recover debugger use. During one day of work those situations tend to reproduce quite a lot which is why i am arguing :) |
Taking another look at this and the draft PR 508. This PR is a nice improvement on the HCR failure path. I can see it still leaves e.g. the path in which dev mode restarts the server upon a bootstrap.properties update. Let's think about that more. |
Hi @andre-doherty - just wanted to let you know that we are targeting 24.0.12 for this support. Hammering out the final details after your latest feedback (thank you!), particularly with handling debugger restart when a "disconnect" is explicitly selected on the debug target. |
hello,
I wanted to report that behavior :
When debugging an application (so when in dev mode), if "r" is hit from the terminal, then the debugging session is gone.
The liberty server will allocate a new debugging port and so the existing configuration will have to be modified to be able to hook again with the debugger.
To be noted as well :
Regards,
André
The text was updated successfully, but these errors were encountered: