Skip to content
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

Add scope precision to breakpoint toggling #6238

Open
filipdutescu opened this issue Mar 9, 2023 · 0 comments
Open

Add scope precision to breakpoint toggling #6238

filipdutescu opened this issue Mar 9, 2023 · 0 comments
Labels
A-debug-adapter Area: Debug adapter client C-enhancement Category: Improvements

Comments

@filipdutescu
Copy link
Contributor

Description

After #5957, debug line highlights will not be scope-aware, meaning if you place a breakpoint in a lambda function, the whole line is highlighted, instead of the lambda scope.

Proposal

Use the LSP to figure out how much of the code the breakpoint should cover (setting the end_line, column and end_column properties) and update the DAP highlighting to make use of those extra values.

UI example of how it would look

image

Ignore the colours and theme, as it was made with a selection to highlight the idea behind it.

@filipdutescu filipdutescu added the C-enhancement Category: Improvements label Mar 9, 2023
filipdutescu added a commit to filipdutescu/helix that referenced this issue Mar 12, 2023
Continuing work done in helix-editor#5957, these changes add column precision
to breakpoints for those set using the keymap command. For those set
with the mouse, preserve the current behaviour, concretely, add a line
breakpoint. This allows for more fine grained control, allowing, for
debuggers which support it, to add breakpoints to scopes such as lambda
functions, callbacks and more.

Change how the stack frame line is highlighted, using a full line for
breakpoints which apply to a line and highlight only the scope for those
that operate only on those scopes.

Closes: helix-editor#6238
Signed-off-by: Filip Dutescu <filip.dutescu@gmail.com>
filipdutescu added a commit to filipdutescu/helix that referenced this issue Mar 12, 2023
Continuing work done in helix-editor#5957, these changes add column precision
to breakpoints for those set using the keymap command. For those set
with the mouse, preserve the current behaviour, concretely, add a line
breakpoint. This allows for more fine grained control, allowing, for
debuggers which support it, to add breakpoints to scopes such as lambda
functions, callbacks and more.

Change how the stack frame line is highlighted, using a full line for
breakpoints which apply to a line and highlight only the scope for those
that operate only on those scopes.

Closes: helix-editor#6238
Signed-off-by: Filip Dutescu <filip.dutescu@gmail.com>
filipdutescu added a commit to filipdutescu/helix that referenced this issue Mar 12, 2023
Continuing work done in helix-editor#5957, these changes add column precision
to breakpoints for those set using the keymap command. For those set
with the mouse, preserve the current behaviour, concretely, add a line
breakpoint. This allows for more fine grained control, allowing, for
debuggers which support it, to add breakpoints to scopes such as lambda
functions, callbacks and more.

Change how the stack frame line is highlighted, using a full line for
breakpoints which apply to a line and highlight only the scope for those
that operate only on those scopes.

Closes: helix-editor#6238
Signed-off-by: Filip Dutescu <filip.dutescu@gmail.com>
filipdutescu added a commit to filipdutescu/helix that referenced this issue Mar 12, 2023
Continuing work done in helix-editor#5957, these changes add column precision
to breakpoints for those set using the keymap command. For those set
with the mouse, preserve the current behaviour, concretely, add a line
breakpoint. This allows for more fine grained control, allowing, for
debuggers which support it, to add breakpoints to scopes such as lambda
functions, callbacks and more.

Change how the stack frame line is highlighted, using a full line for
breakpoints which apply to a line and highlight only the scope for those
that operate only on those scopes.

Closes: helix-editor#6238
Signed-off-by: Filip Dutescu <filip.dutescu@gmail.com>
@pascalkuthe pascalkuthe added the A-debug-adapter Area: Debug adapter client label Apr 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-debug-adapter Area: Debug adapter client C-enhancement Category: Improvements
Projects
None yet
Development

No branches or pull requests

2 participants