-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
Debugger implementation #13433
Draft
RemcoSmitsDev
wants to merge
770
commits into
zed-industries:main
Choose a base branch
from
RemcoSmitsDev:debugger
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+26,080
−416
Draft
Debugger implementation #13433
Changes from 250 commits
Commits
Show all changes
770 commits
Select commit
Hold shift + click to select a range
918869f
Merge branch 'main' into debugger
Anthony-Eid 14a2f75
Variable list keyboard navigation (#84)
RemcoSmitsDev 797f5bd
Merge branch 'main' into debugger
RemcoSmitsDev c91f51d
Log errors ins stepping tasks, and update tests
RemcoSmitsDev 887e2a6
Use Toast Notification for Debug Session Warning (#83)
Anthony-Eid 943609f
Fix failing editor test
RemcoSmitsDev 4e13a00
Add missing action handler for OpenDebugTasks
RemcoSmitsDev 4baa7f7
Don't show Telemetry data in output console
RemcoSmitsDev 5aa816e
Fix telemetry spelling error
Anthony-Eid 2736b2f
Update rust-embed version to fix cicd build error (#87)
Anthony-Eid f9f2810
Add launch delay for gdb debugger
Anthony-Eid a7e26bb
Proxy dap requests to upstream clients (#77)
Anthony-Eid 8ecd547
Debug output grouping (#86)
RemcoSmitsDev 06c11f9
Move send request to dap client to background thread
RemcoSmitsDev a9d7858
Add restart stack frame (#85)
RemcoSmitsDev 41b7028
Fix only allow autocompletion for variables that are from the current…
RemcoSmitsDev 8694650
Send synced breakpoints to active DAP servers in collab (#89)
Anthony-Eid d03e414
Fix CustomEvent type field are not public
RemcoSmitsDev bc49c18
Fix Collab Module List Bug (#91)
Anthony-Eid 568f127
Fix name error in module list func
Anthony-Eid a193efd
Re-send breakpoints when source file has been changed (#92)
RemcoSmitsDev f34fc7f
Use arc for dap command request instead of cloning the command itself
RemcoSmitsDev 272721a
Merge branch 'main' into debugger
RemcoSmitsDev 868f55c
Fix failing test
RemcoSmitsDev 5ecfef0
Fix failing test because of race condition
RemcoSmitsDev 4de9921
Add support for adapter specific clipboard value formatting
RemcoSmitsDev 1a5feff
Implment Variable List Toggling Function in Collab (#88)
Anthony-Eid 675fb2f
Fix only show restart frame icon for frames that allow it
RemcoSmitsDev 7b6d20b
Stack frame presentation hint (#94)
RemcoSmitsDev e1392c9
Allow sending breakpoint request for unopened buffers
RemcoSmitsDev 647f411
Add test for sending breakpoints for unopened buffers
RemcoSmitsDev 9bca023
Shutdown debug session when launch/attach fails
RemcoSmitsDev 5a52c7e
Add test to for shutdown on launch/attach failure
RemcoSmitsDev 953843a
Add stack frame source origin to tooltip
RemcoSmitsDev 8ceb115
Fix typo in docs
RemcoSmitsDev a89e295
Rename `server` to `adapter` inside the dap log
RemcoSmitsDev 56abc60
Collab - Toggle Ignore Breakpoints (#93)
Anthony-Eid ec547b8
Add debug configuration documentation (#96)
RemcoSmitsDev 1fb0c5b
Fix bug where lldb user installed path wasn't used in some cases
Anthony-Eid 7886582
Transition to gpui3 (#103)
Anthony-Eid 25db814
Merge branch 'main' into debugger
Anthony-Eid a2e0b67
Merge branch 'main' into debugger
Anthony-Eid dfe978b
Add toolchain support for python debug adapter (#90)
RemcoSmitsDev 197166a
Fix clippy errors
Anthony-Eid ef3a6de
Improve the visibility of process entries (#105)
RemcoSmitsDev 889949c
Add lldb attach support
Anthony-Eid e81a7e1
Merge branch 'main' into debugger
RemcoSmitsDev b6b7ad3
Remove commented code in lldb attach code
RemcoSmitsDev c994075
Clean up Debugger collab tests (#104)
Anthony-Eid 47b3f55
Minor cleanup of breakpoint context menu code
Anthony-Eid 3bf5833
Make Pane take non-optional double click action again
osiewicz 945e322
Lazy load stack frame information (scopes & variables) (#106)
RemcoSmitsDev 26f14fd
Remove futures from debugger ui crate
RemcoSmitsDev c45b6e9
Clean up naming in activity_indicator.rs
osiewicz 69548f5
Clean up naming around activity indicator and binary statuses
osiewicz 44e9444
Fix choose debugger action didn't work anymore
RemcoSmitsDev 4c93065
Use workspace values for edition and publish in new crates
osiewicz d600898
Show console output on remote debug clients (#107)
Anthony-Eid 5cd93ca
Fix test_extension_store_with_test_extension
Anthony-Eid dfeddaa
Remove unused dep from activity indicator
osiewicz 080d0c4
Remove sqlez dependency on project
osiewicz ad98bf4
Trigger CLA check
osiewicz a56e3ea
Merge branch 'main' into debugger
osiewicz 5235024
cargo fmt
osiewicz dcde289
Merge branch 'main' into debugger
osiewicz 28874b6
Fix up symlinks for license files
osiewicz 27b6043
Revert "Lazy load stack frame information (scopes & variables) (#106)"
Anthony-Eid 3cf9658
Revert "Remove futures from debugger ui crate"
Anthony-Eid aa268d1
Merge branch 'main' into debugger
RemcoSmitsDev c76144e
Re-Apply Lazy load stack frame information (#108)
RemcoSmitsDev 1be2836
Refactor session id to use entity instead (#109)
RemcoSmitsDev 4fcb10d
lsp: Add support for default rename behavior in prepareRename request…
osiewicz 180ce5e
edit prediction: Allow enabling OSS data collection with no project o…
agu-z 6ec4adf
Accept edit predictions with `alt-tab` in addition to `tab` (#24272)
agu-z b7f0a1f
windows: Fix tests on Windows (#22616)
JunkuiZhang da66f75
Revert "copilot: Correct o3-mini context length" (#24275)
notpeter 33e3928
languages: Sort dependencies in `Cargo.toml` (#24277)
maxdeviant cee4e25
edit predictions: Onboarding funnel telemetry (#24237)
agu-z e21ea19
edit prediction: Don't log an error if license file isn't found (#24278)
danilo-leal 9c3e85a
Rework shared commit editors (#24274)
SomeoneToIgnore dac2873
Fix the worktree's repository_for_path (#24279)
cole-miller b6182d0
edit prediction: Fix license detection error logging + check for diff…
danilo-leal 2973b46
Revise the `MessageNotification` component (#24287)
danilo-leal 9ef8ace
edit prediction: Improve UX around `disabled_globs` and `show_inline_…
bennetbo 64bc112
Revert recent anti-aliasing improvements (#24289)
SomeoneToIgnore 16eff80
Merge branch 'main' into debugger
osiewicz af77b2f
WIP refactor (#110)
RemcoSmitsDev 2fc7c17
Remove debugger collab db tables (#111)
Anthony-Eid 05ca096
Use observe for module list instead of clearing only when the length …
RemcoSmitsDev dad39ab
Move module list to new structure
RemcoSmitsDev 39d4d62
Merge branch 'main' into debugger
osiewicz 062e64d
cargo fmt
osiewicz e216805
Add check if request is support inside dap command
RemcoSmitsDev 8b45634
Invalidate dap session information on stopped event
RemcoSmitsDev 90deb4a
Merge branch 'main' into debugger
osiewicz 9ac18e9
Add assert for unexpected debug command
osiewicz 9d5525e
Move DAP modules in project into debugger submodule
osiewicz c8ba6d7
Move caps onto the debug client state
osiewicz 041e1ee
Move sessions mapping to DapStore itself
osiewicz 661e5b0
Merge branch 'main' into debugger
osiewicz ecfc0ef
Move requests into client (#112)
RemcoSmitsDev 91e60d7
Add `BreakpointStore` to debugger crate (#114)
Anthony-Eid 3833788
Add missing init for breakpointstore
RemcoSmitsDev c820f12
Check capabilities outside of dap_session
osiewicz 00c24ce
Simplify DapCommand::is_supported
osiewicz be80ded
Merge branch 'main' into debugger
osiewicz 90440d9
fixup! Check capabilities outside of dap_session
osiewicz debcb1f
WIP
osiewicz 936ac21
Another WIP
osiewicz cdb5af2
Remove project from toggle breakpoint dependencies
Anthony-Eid 3aab70c
Fix some warnings
Anthony-Eid 53336ee
Move breakpoint serialization/deserialization to breakpoint store fro…
Anthony-Eid e285ae6
WIP
osiewicz d0f64d4
Add placeholder for thread dropdown
osiewicz 6648d62
Use dropdown menu instead
osiewicz 43e2c4d
Keep going
osiewicz 7fe8c62
Fix up one call site
osiewicz 36b430a
Add a doc comment for the debugger module
osiewicz 12c02a1
WIP
osiewicz bc5904e
Fix breakpoint line numbers not being colored
Anthony-Eid f7886ad
Remove display_row from line number layout struct
Anthony-Eid 294ce96
WIP
osiewicz 0233152
Get rid of supports_attach (we'll configure it differently later on)
osiewicz f8e2482
Merge branch 'main' into debugger
osiewicz b1ca8c3
Merge branch 'debugger' into remove-dap-session
osiewicz a0c91d6
WIP
osiewicz 45db28a
Project compiles, yay
osiewicz ad356d9
Building! And crashing
osiewicz fbf4eb9
fixup! Building! And crashing
osiewicz cf13a62
Rename client module to session
osiewicz c9a9ab2
And the rename is complete
osiewicz f81463c
WIP
osiewicz 1e0a0fa
Renames
osiewicz 0dc90fd
UI shred
osiewicz 9786da2
WIP
osiewicz 9559096
WIP
osiewicz 0633896
WIP
osiewicz b67a382
WIP
osiewicz 24e816b
WIP
osiewicz c07526f
Fix focus on inert state
osiewicz 45cf5b5
Add basic tab content
osiewicz 16dba67
UI touchups
osiewicz 6737555
Add launch/attach buttons
osiewicz 7797b70
Wire up click handler
osiewicz edfeea2
Add a new item to pane if it's empty
osiewicz 9b8ea48
Split out local part from DapCommand
osiewicz abda28f
Use LocalDapCommand in bounds
osiewicz 28d6e76
Add Initialize command
osiewicz 05a3537
cleanups
osiewicz bd27f87
Rename DebugAdapterClientId to SessionId
osiewicz b8383be
Renames
osiewicz afaaf24
Renames
osiewicz a8f59b8
Renames
osiewicz c308a8c
Reduce visibility of modes
osiewicz ced8514
Merge pull request #115 from zed-industries/remove-dap-session
osiewicz 04a1e56
fmt
osiewicz 1d5fc37
Change dap name on click in inert state
osiewicz e82520c
Move from inert to starting state
osiewicz 083fca4
Style starting state a bit
osiewicz 9ea14ec
Touchups
osiewicz b891172
client_id -> session_id some more
osiewicz 1c10133
^
osiewicz b4c2de0
Oops
osiewicz 27bda50
Remove another session id
osiewicz 2ca2942
Adjust DAP store to return session from start methods
osiewicz b159e3c
Remove start_client_internal
osiewicz 4d2ecb2
Remove some more code
osiewicz 4bb00ad
Merge branch 'main' into debugger
osiewicz 5908d5d
Cherry pick from remove-dap-session
Anthony-Eid 4e0408a
Start wiring in running state
osiewicz 286532e
Handle initialize event
Anthony-Eid df6c364
Clean up handle initialized event return func
Anthony-Eid c1ad987
Rename event handler to message handle in debug client func
Anthony-Eid 1644871
Start work on handling stopped event
Anthony-Eid 060c8df
Remove code
osiewicz 859cc67
WIP
osiewicz 1af8c11
Initialization sequence
osiewicz 95eca60
Bring back old UI
osiewicz ac68f31
Allow session to handle toggling ignore breakpoint
Anthony-Eid 13dd3aa
Enable session to send changed breakpoints to active dap servers
Anthony-Eid 83a8933
Merge branch 'main' into debugger
osiewicz 650984b
Send out breakpoints in the configuration sequence
osiewicz b43a2d1
Bubble up event handling to Session and Dap Store
osiewicz c711168
Start wiring through thread state handling
osiewicz 14eab34
Show threads in the dropdown
osiewicz 2e83b37
Fix didn't do anything with returned task
RemcoSmitsDev 8a5e754
Impl continued event
RemcoSmitsDev 03144d7
Mark thread list as disabled when there are no threads.
osiewicz f4cb78f
Fix a few clippy errors
RemcoSmitsDev c8632a3
Show stack frames when you a select thread
RemcoSmitsDev 26502cd
Read thread status from session
RemcoSmitsDev 55a39d5
Use LocalDapCommand::is_supported for ConfigurationDone
osiewicz 0358cdc
Start sketching out config view
osiewicz 9815a8f
Clean up errors and only send modules requests when thread is stopped
Anthony-Eid 6e17f91
send out breakpoints in the initial batch
osiewicz 9bac1ff
Display selected thread & auto-select first thread if we don't have a…
osiewicz eeded3d
Allow starting session from action and add new session as item to deb…
Anthony-Eid 3378b7a
Get module list to render correctly
Anthony-Eid 5973719
Invalidate all stack frames on thread event
osiewicz 58640da
Annotate cacheable requests on LocalDapCommand level
osiewicz 6375d34
Start work on enabling getting active debug line to show in editor
Anthony-Eid 38a634c
Merge branch 'main' into debugger
osiewicz d327e60
Remove unused import
osiewicz 0c7cd6f
Make one-based rows explicit by use of NonZeroU32
osiewicz 0e998cd
Change stack frame data structure to index map instead of vec
Anthony-Eid ef87cc3
Merge branch 'main' into debugger
osiewicz 97ed70d
Merge branch 'debugger' of github.com:RemcoSmitsDev/zed into debugger
osiewicz d34726f
Fix compile error
RemcoSmitsDev f957e79
Fix incorrect if statement logic for when to fetch stack frames
RemcoSmitsDev 76b2004
Fix some clippy errors
RemcoSmitsDev 7b0dd68
Update if statement for fetching modules and loaded sources
RemcoSmitsDev c391ff8
Remove unused method
RemcoSmitsDev 14472db
Invalidate modules and loaded source when receiving events
RemcoSmitsDev 104980a
Impl capabilities event
RemcoSmitsDev 7b49c7a
Remove unused function
osiewicz a8c79cc
Oopps
RemcoSmitsDev 417e1d9
Get scopes to render when selecting a stack frame
Anthony-Eid 255c86c
Make output console work again (#116)
RemcoSmitsDev bd3ffd7
Add evaluate value to output console again
RemcoSmitsDev 6a339a1
Fix one more todo
RemcoSmitsDev e529783
Merge branch 'main' into debugger
osiewicz 8bfa317
Merge branch 'debugger' of github.com:RemcoSmitsDev/zed into debugger
osiewicz a30b50c
breakpoint_store: Adjust fn visibility
osiewicz 1dc7c41
Start playing with breakpoint store
osiewicz ed82419
Merge branch 'main' into debugger
osiewicz 2a802d4
Add feature flag for debugger
osiewicz 9cd0ef2
Fix new errors
osiewicz 7695b73
WIP Get first level of variables to render
66d6b79
Merge branch 'main' into debugger
osiewicz 3c65060
Fix merge adapter args with config initialize args
RemcoSmitsDev f12b3c9
Use adapter name as id for initialize request
RemcoSmitsDev 63e2ca3
Fix missing import
RemcoSmitsDev cc5bcd8
WIP variable list stuff
6d2f113
WIP implement StartDebugging reverse request
RemcoSmitsDev 9a7ecdc
Revert "WIP variable list stuff"
RemcoSmitsDev cba76fe
Shutdown parent session on self shutdown
RemcoSmitsDev f4bd652
Skip output events with Telemetry category
RemcoSmitsDev 12cead7
Remov unused methods
RemcoSmitsDev 0a59016
Fix compile error
RemcoSmitsDev cb2fda0
Fix select thread menu not working with multiple running clients
RemcoSmitsDev 2dfe6cd
File compile error on x86 arch
RemcoSmitsDev 43bf537
Require port in TcpArguments and use configured host
RemcoSmitsDev f8eebc7
Fix compile error with optional port
RemcoSmitsDev 393fe5f
Get dap crate tests to pass again
RemcoSmitsDev f95c4df
Send response back on StartDebugging reverse request
RemcoSmitsDev 17c7ede
Fix use tcp transport for go adapter
RemcoSmitsDev 62f2bc8
Oops
RemcoSmitsDev fa3cf3e
Remove is_fake field on DebugAdapterBinary instead always use fake ad…
RemcoSmitsDev 6021f04
Clipppppyyy
RemcoSmitsDev 0797e2a
Complete handle StartDebugging reverse request
RemcoSmitsDev File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
[ | ||
{ | ||
"label": "Debug Zed with LLDB", | ||
"adapter": "lldb", | ||
"program": "$ZED_WORKTREE_ROOT/target/debug/zed", | ||
"request": "launch", | ||
"cwd": "$ZED_WORKTREE_ROOT" | ||
}, | ||
{ | ||
"label": "Debug Zed with GDB", | ||
"adapter": "gdb", | ||
"program": "$ZED_WORKTREE_ROOT/target/debug/zed", | ||
"request": "launch", | ||
"cwd": "$ZED_WORKTREE_ROOT", | ||
"initialize_args": { | ||
"stopAtBeginningOfMainSubprogram": true | ||
} | ||
} | ||
] |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
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
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We'll prolly want to define default debug tasks on an adapter-by-adapter basis. |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
[ | ||
{ | ||
"label": "Debug active PHP file", | ||
"adapter": "php", | ||
"program": "$ZED_FILE", | ||
"request": "launch", | ||
"cwd": "$ZED_WORKTREE_ROOT" | ||
}, | ||
{ | ||
"label": "Debug active Python file", | ||
"adapter": "python", | ||
"program": "$ZED_FILE", | ||
"request": "launch", | ||
"cwd": "$ZED_WORKTREE_ROOT" | ||
}, | ||
{ | ||
"label": "Debug active JavaScript file", | ||
"adapter": "javascript", | ||
"program": "$ZED_FILE", | ||
"request": "launch", | ||
"cwd": "$ZED_WORKTREE_ROOT" | ||
}, | ||
{ | ||
"label": "JavaScript debug terminal", | ||
"adapter": "javascript", | ||
"request": "launch", | ||
"cwd": "$ZED_WORKTREE_ROOT", | ||
"initialize_args": { | ||
"console": "integratedTerminal" | ||
} | ||
} | ||
] |
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit/todo: we'll have to fill in key bindings before merging.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Btw I have a branch where i started adding the key bindings. Will merge it by Wednesday