Skip to content

Show visual hints for inline breakpoints #31612

Closed
@auchenberg

Description

@auchenberg

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

  1. User sets regular/initial breakpoint by clicking on the line number.
  2. 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.
  3. User can not toggle these visual hints into column breakpoints (same as pressing SHIFT+F9 at the location)

Visual hint
inline breakpoints vs

Column breakpoint set
screen shot 2017-07-27 at 2 31 02 pm

Arguments against

  1. 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?

Metadata

Metadata

Labels

debugDebug viewlet, configurations, breakpoints, adapter issuesfeature-requestRequest for new features or functionalityon-testplanrelease-notesRelease notes issues

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions