-
Notifications
You must be signed in to change notification settings - Fork 34.7k
Closed
Labels
debugDebug viewlet, configurations, breakpoints, adapter issuesDebug viewlet, configurations, breakpoints, adapter issuesfeature-requestRequest for new features or functionalityRequest for new features or functionality
Milestone
Description
There might be an issue for this already but I can't find one, so here's a general feature request for discussion.
It would be very useful to be able to set a breakpoint on a particular column of a line. It's useful for debugging promises -
asyncFn().then(() => foo())
.then(() => bar())
.then(() => something())
or minified code -
a();b();c();
especially since we don't have any way to pretty-print scripts while debugging them. As is, there's no way to break inside the then
s or on expressions that are packed on the same line without reformatting your code or setting breakpoints in other places.
This is handled by the protocol already but needs UI work.
- How do we show which part of the line the breakpoint is associated with?
- VS and F12 highlight the actual statement for the bp. I'm not sure that works for vscode, because we'll only know the column position and won't necessarily have the language knowledge to know the whole span in question.
- Show a decoration inline if column != 0? Only visible when hovering over the bp in the margin?
- Then these will often show up when setting a bp with F9, just because the cursor is somewhere else in the line, even if it's the same as a bp at column 0
- How do we show multiple breakpoints on one line?
- Need a 'add breakpoint' as a context menu option on the editor
- Setting a breakpoint by F9 needs to respect the column position of the cursor
And a cheaper way to experiment with this could be to change the "Run to cursor" option to respect the column.
siegebell, intellix, Abuntxa, gulshan, mickdekkers and 3 more
Metadata
Metadata
Assignees
Labels
debugDebug viewlet, configurations, breakpoints, adapter issuesDebug viewlet, configurations, breakpoints, adapter issuesfeature-requestRequest for new features or functionalityRequest for new features or functionality