-
Notifications
You must be signed in to change notification settings - Fork 82
Debugger Restart Frame #2582
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
base: main
Are you sure you want to change the base?
Debugger Restart Frame #2582
Conversation
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #2582 +/- ##
=======================================
- Coverage 46% 46% -1%
+ Complexity 6631 6626 -5
=======================================
Files 793 794 +1
Lines 65623 65671 +48
Branches 9828 9836 +8
=======================================
Hits 30485 30485
- Misses 32782 32826 +44
- Partials 2356 2360 +4 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
DavyLandman
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks mostly fine, I have one place where I want to ask @jurgenvinju to take a look once he's back.
| // Handle frame restart at this level | ||
| // Restore environment state and retry execution | ||
| // Continue the while loop to retry the call | ||
| if(ctx instanceof Evaluator) { | ||
| Evaluator evaluator = (Evaluator) ctx; | ||
| var stackTrace = evaluator.getCurrentStack(); | ||
| if(stackTrace.size() == 1){ // should not happen because this is the REPL frame | ||
| throw new ImplementationError("Cannot restart frame of the REPL"); | ||
| } | ||
| if (rfe.getTargetFrameId() == stackTrace.size() -1) { // the frame to restart | ||
| restartFrame = true; | ||
| continue; // restart the frame by continuing the while loop | ||
| } | ||
| else { // not the frame to restart, rethrow to let upper frames handle it | ||
| throw rfe; | ||
| } | ||
| } | ||
| throw new ImplementationError("Frame restart is only supported in Evaluator contexts"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is something for @jurgenvinju to review.
Add restart frame support to the DAP.
Demo :
restartframe.mp4