forked from zed-industries/zed
-
Notifications
You must be signed in to change notification settings - Fork 0
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
Breakpoints #7
Merged
Merged
Breakpoints #7
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
The main thing this commit does is fix race conditions between a dap client's event handler and sending a launch/attach request. Some adapters would only respond to a starting request after the client handled an init event, which could never happen because the client used to start it's handler after it sent a launch request. This commit also ignores undefined errors instead of crashing. This allows the client to work with adapters that send custom events. Finially, I added some more descriptive error messages and change client's starting request seq from 0 to 1 to be more in line with the specs.
Adds the ability to ignore custom events. Also, some more descriptive error handling and documentation.
Merging with the main zed branch removed a function that the debugger panel relied on. I added the function back and changed it to work with the updated internals of zed.
Warning: Project is not being sent breakpoints right now
Breakpoints are now stored in a BTreeMap<buffer_id, HashSet<Breakpoint>> I did this becauase we need to constant check if a breakpoint exists in a buffer whenever we toggle one.
Previously editor would send breakpoints to project whenever a new breakpoint was deleted or added. Now editor shares a shared pointer to a breakpoint datastructure. This behavior is more efficient because it doesn't have to repeatly send breakpoints everytime one is updated. Still have to handle cases when a breakpoint is added/removed during a debugging phase. I also have to figure out how to share the breakpoints pointer only once per project and editor.
Instead of editor sharing with project each time a breakpoint is toggled. An editor will clone project's breakpoints if a project is passed into the editors new function
The end goal of this commit is to allow a user to set a breakpoint by hovering over a line in the editor's gutter. Currently breakpoints only show on line 6 when the mouse is on a gutter.
…oint The breakpoints that are added through clicking on the gutter can't be affect by the toggle breakpoint command. This is a bug
…ng files The crash was happening because editor was trying to render all breakpoints even if they didn't belong to the current buffer. Breakpoint don't persistent after closing a tab, will need to change the breakpoint DS key from buffer_id to something more permament
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Release Notes:
Currently breakpoints are not updated when lines before a breakpoint are deleted or added. Breakpoints also don't persistent between separate reloads of zed. The goal of this PR is to tackle both these issues to get breakpoints that stay in the same position relative to the line of code they were placed on and get breakpoints to remain after closing zed.
Completed:
position
Next PR TODO:
Discovered Bugs:
Current Behavior:
Screen.Recording.2024-07-27.at.6.13.58.PM.mov