Description
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
- User sets regular/initial breakpoint by clicking on the line number.
- Light red visual hints (similar to how to show hints in the gutter) now appear on this same line next to any place where an inline breakpoint can be set.
- User can not toggle these visual hints into column breakpoints (same as pressing SHIFT+F9 at the location)
Arguments against
- Only a few debuggers supports column breakpoints, and therefore we shouldn't prioritize this functionality unless more debuggers gain support.
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 hints
VS Debug Protocol
I assume the VS Debug Protocol could have to get extended to support this?