-
Notifications
You must be signed in to change notification settings - Fork 30k
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
Show visual hints for inline breakpoints #31612
Comments
Please note that column breakpoint positions are only available if a debug session is active. So discoverability is not improved if no session is active. Yes, the debug protocol can always be extended. But it already supports something related: https://github.com/Microsoft/vscode-debugadapter-node/blob/master/protocol/src/debugProtocol.ts#L898 |
Good point. I don't think it would be blocker for the experience, as I imagine developers will set "inline breakpoints" as a part of a workflow where a debug session is active. That said I don't have any data to back this up. |
The bigger issue is the way we currently decorate everything "inline" (i.e. column breakpoints or inlined variable values). This is based on a mechanism that doesn't scale well. So Alex considers this "debt" that we should fix before we make more use of it... |
@auchenberg when we initialy implemented column breakpoints we first looked into this experience. However due to techinical limiations we went with the current approach. And I agree of course that this experience is much better than our current one. |
@isidorn Gotcha. This could potentially be provided by the JavaScript language server, right? Chrome DevTools is making the |
@auchenberg in theory this could be provided by the language server |
@auchenberg the JavaScript language service is an implementation detail of the JavaScript extension. So VS Code has no access to it. In addition the LSP does not (yet) support any debug specific functionality. Here are three architectural options we have to connect debug extension with language extension:
|
@weinand I think this could be implemented simpler without tight integration between LSP and DAP's.
Possible? |
@auchenberg I don't think so.
BTW, VS Code's TypeScript/JavaScript extensions does not use LSP. |
@weinand Well you know quite a bit more about the architecture of Code, DAPs and LSP than me, so I trust you on this ;) |
Even though this is a muscle item for the february milestone @weinand informed me that we already have protocol to support this, however the adapters are not implemetning this yet. |
This issue is being closed to keep the number of issues in our inbox on a manageable level, we are closing issues that are not going to be addressed in the foreseeable future: We look at the number of votes the issue has received and the number of duplicate issues filed. If you disagree and feel that this issue is crucial: We are happy to listen and to reconsider. If you wonder what we are up to, please see our roadmap and issue reporting guidelines. Thanks for your understanding and happy coding! |
@weinand I still think this is a feature we should land to improve debugging of arrow functions in JS, which we are seeing a growing usage of. Right now inline breakpoints aren't discoverable, and visual hints is a big improvement for this. |
In order to support this feature, we need a new DAP request for finding the possible Breakpoints for a source line. I've created microsoft/debug-adapter-protocol#72 for this. |
@roblourens since we added support for this on the vscode side could you look into adding support for the |
Closing this issue since vscode now supports this. |
In #14784 we implemented column breakpoints which is now available for our Chrome and Node debuggers, but discoverability of this very useful feature is rather limited, as you have to set column breakpoints via shift+F9.
Chrome DevTools recently shipped
inline breakpoints
that's a UI on top of column breakpoints, that work's by a user setting the initial breakpoint by clicking on the line number. Light blue markers now appear on this same line next to any place where an inline breakpoint can be set.Details: https://umaar.com/dev-tips/129-inline-breakpoints/
The rationale
We want VS Code to be the best place for editing for JavaScript developers, and column breakpoints has shown to be helpful especially for developer debugging promise-based flows. Adding visual hints for column breakpoints will provide value to our JavaScript developers and will also bring the VS Code debugging experience on pair with Chrome DevTools.
We already support Column breakpoints and given that two of our top debuggers Chrome and Node already supports
getPossibleBreakpoints
, it's relatively low effort to implement this functionality.The experience
Visual hint
Column breakpoint set
Arguments against
Technical details
Chrome/Node has implemented a new
Debugger.getPossibleBreakpoints
that returns a list of the possible breakpoint locations, which is used to light up the visual hintsVS Debug Protocol
I assume the VS Debug Protocol could have to get extended to support this?
The text was updated successfully, but these errors were encountered: