Skip to content
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

Add debug restart #508

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft

Conversation

awisniew90
Copy link
Contributor

@awisniew90 awisniew90 commented May 8, 2024

Fixes #498

This PR creates the following behaviors:

  1. A Hot Code Replace failure will now prompt the user to "refresh" the debugger. This will result in the debugger being disconnected and reconnected
  2. A restart of the server from dev mode via the command line will result in the debugger being disconnected and reconnected when the server restarts (using whatever debug port dev mode chose)
  3. When in debug mode, the debugger is always on.... if disconnected (automatically or manually), it will always attempt to reconnect.

@scottkurz
Copy link
Member

This is a nice improvement on the HCR failure path.

Now that I appreciate the use case better... I can also appreciate that it still leaves say the path in which dev mode restarts the server upon a bootstrap.properties update.

Let's think about that more.

@awisniew90 awisniew90 force-pushed the debug-restart branch 5 times, most recently from cd61919 to 5ce2066 Compare July 12, 2024 14:46
/**
* Updates the state of this target for disconnection from the VM.
*/
@Override
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe a comment explaining we don't know here if we're disconnected() because of dev mode restarting the server vs. the JDT debugger HCR failure refreshing the debugger.

port = parts[1].trim();
String lastEntry = null;

Scanner scan = new Scanner(serverEnv);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Turns out we don't need to make this change.

Signed-off-by: Adam Wisniewski <awisniew@Adams-MacBook-Pro.local>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Restart (r) in dev mode kills the debugging session
2 participants