Repository navigation
Should we disable the debugger when launching from IDE? #731
Description
Activity
Long-term, I think we should not hide the debugger because it seems like an unnecessary restriction. However.. right now VS Code (and maybe others) make assumptions that they are the only debugger and it's not completely obvious how to resolve that.
For example, when a user does a hot reload we have to re-send breakpoints. In order to avoid races, that means doing a hot reload with
pause:true, so VS Code does something like:- Send
hotReload(pause: true) - Wait for
PausePostRequestevent - Send breakpoints
- Send
resume
If there are two debuggers, it's less clear what happens here. Who does the resume? Who sends what breakpoints?
There are other things too - like if you add a breakpoint from DevTools, we should really detect that in VS Code (the extension) and tell VS Code (the editor) about it so that if the user then switches to VS Code and changes the breakpoints, we don't end up losing the one that was added by DevTools (VS code just gives us a new complete list to replace the previous breakpoints for the file).
I don't think the work is technically complicated, but the rules for these things aren't obvious (to me at least) and probably need some coordination across tools.
- Send
I agree we can make all these cases work but we need to do some API design to make it possible. Currently we have no way of letting multiple clients perform an action after pausing on start.
- modified the milestones: On Deck, This milestone has been deleted, This milestone has been deleted, 0.1.3
on Jun 17, 2019 - addeddevtools-debugger-screenIssues with the Debugger screenIssues with the Debugger screenP3issues we think are valid but not importantissues we think are valid but not important
on Oct 24, 2024
I'm opening this issue to discuss whether we should continue to hide the debugger when launching devtools from an IDE.
Right now, we hide the debugger when launching from VSCode but we do not when launching from IntelliJ (see commit).
We have a feature request to not hide the debugger when launching from VSCode.
Briefly discussed this with @devoncarew this morning, and I'll let him add his thoughts here.
@jacob314 @DanTup @terrylucas