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

Breakpoint prompt editor #44

Merged

Conversation

Anthony-Eid
Copy link
Collaborator

Notes

This PR adds the ability to create custom messages when creating/editing a log breakpoint & fixes some bugs regarding breakpoint toggling and gutter icon overlaps.

TODO

  • Allow the creation of custom log breakpoints
  • Fix breakpoint toggling bug
  • Fix gutter icon symbol overlap bug with breakpoints

Bugs

Log breakpoints are ignored if no breakpoints were hit prior to a log breakpoint. This is probably a setting with dap servers that we need to set as a client.

Preview

Screen.Recording.2024-10-03.at.12.17.01.AM.mov

This bug occurs when a breakpoint anchor position is moved from the begining
of a line. This causes dap_store.breakpoint hashmap to fail to properly get
the correct element, thus toggling the wrong breakpoint.

The fix to this bug is passing a breakpoint anchor to an editor's display map
and to the render breakpoint function. Instead of creating a new anchor when
clicking on a breakpoint icon, zed will use the breakpoint anchor passed to
the display map.

In the case of using toggle breakpoint action, zed will iterate through all
breakpoints in that buffer to check if any are on the cursor's line number,
then use anchor if found. Otherwise, zed creates a new anchor.
This bug happened when an icon {code action | code runner} was rendered on the same line of a breakpoint
where that breakpoint's anchor was not at the start of the line
Anthony-Eid and others added 2 commits October 4, 2024 13:49
Co-authored-by: Remco Smits <djsmits12@gmail.com>
Co-authored-by: Remco Smits <djsmits12@gmail.com>
@Anthony-Eid Anthony-Eid merged commit 93af1bf into RemcoSmitsDev:debugger Oct 4, 2024
0 of 4 checks passed
@Anthony-Eid Anthony-Eid deleted the breakpoint-prompt-editor branch October 4, 2024 18:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant