Heads-up: `Debugger#restartFrame` now working again
See original GitHub issueWe recently re-implemented the Debugger#restartFrame
CDP method that allows restarting of functions while paused (CL).
This is just a heads-up in case folks are interested in bringing this feature also to JS debugging in VS Code.
The new semantics are a bit different though, in that V8 won’t always allow functions to be restarted. We communicate this info in the Debugger.paused
event where each call frame now has a canBeRestarted
flag. This info is accurate as long as the user doesn’t mess with stack between pausing and requesting a frame restart. Calling the restartFrame
CDP method also continues execution immediately, but will pause automatically at the beginning of the restarted function.
Issue Analytics
- State:
- Created a year ago
- Reactions:1
- Comments:10 (7 by maintainers)
Top Results From Across the Web
Heads Up! (@HeadsUp) / Twitter
“Heads Up!” has arrived for Zoom! You can now play your favorite game with your favorite people without being in the same room....
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Let’s say you have a function
foo
and a functionmyCallback
in your script andfoo
calls some Web/Node API:When stopped in
myCallback
you won’t be able to restartfoo
(assuming its still on the stack).As a side note, this is different to e.g. async/generator functions, which can’t be restarted for other reasons.
It’s a bit technical: Essentially we can’t restart across C++ frames (because destructors need to run when dropping C++ frames), which means restarting across Web APIs or Node APIs is now prohibited.