ZIm/crates
Remco Smits 41a60ffecf
Debugger implementation (#13433)
###  DISCLAIMER

> As of 6th March 2025, debugger is still in development. We plan to
merge it behind a staff-only feature flag for staff use only, followed
by non-public release and then finally a public one (akin to how Git
panel release was handled). This is done to ensure the best experience
when it gets released.

### END OF DISCLAIMER 

**The current state of the debugger implementation:**


https://github.com/user-attachments/assets/c4deff07-80dd-4dc6-ad2e-0c252a478fe9


https://github.com/user-attachments/assets/e1ed2345-b750-4bb6-9c97-50961b76904f

----

All the todo's are in the following channel, so it's easier to work on
this together:
https://zed.dev/channel/zed-debugger-11370

If you are on Linux, you can use the following command to join the
channel:
```cli
zed https://zed.dev/channel/zed-debugger-11370 
```

## Current Features

- Collab
  - Breakpoints
    - Sync when you (re)join a project
    - Sync when you add/remove a breakpoint
  - Sync active debug line
  - Stack frames
    - Click on stack frame
      - View variables that belong to the stack frame
      - Visit the source file
    - Restart stack frame (if adapter supports this)
  - Variables
  - Loaded sources
  - Modules
  - Controls
    - Continue
    - Step back
      - Stepping granularity (configurable)
    - Step into
      - Stepping granularity (configurable)
    - Step over
      - Stepping granularity (configurable)
    - Step out
      - Stepping granularity (configurable)
  - Debug console
- Breakpoints
  - Log breakpoints
  - line breakpoints
  - Persistent between zed sessions (configurable)
  - Multi buffer support
  - Toggle disable/enable all breakpoints
- Stack frames
  - Click on stack frame
    - View variables that belong to the stack frame
    - Visit the source file
    - Show collapsed stack frames
  - Restart stack frame (if adapter supports this)
- Loaded sources
  - View all used loaded sources if supported by adapter.
- Modules
  - View all used modules (if adapter supports this)
- Variables
  - Copy value
  - Copy name
  - Copy memory reference
  - Set value (if adapter supports this)
  - keyboard navigation
- Debug Console
  - See logs
  - View output that was sent from debug adapter
    - Output grouping
  - Evaluate code
    - Updates the variable list
    - Auto completion
- If not supported by adapter, we will show auto-completion for existing
variables
- Debug Terminal
- Run custom commands and change env values right inside your Zed
terminal
- Attach to process (if adapter supports this)
  - Process picker
- Controls
  - Continue
  - Step back
    - Stepping granularity (configurable)
  - Step into
    - Stepping granularity (configurable)
  - Step over
    - Stepping granularity (configurable)
  - Step out
    - Stepping granularity (configurable)
  - Disconnect
  - Restart
  - Stop
- Warning when a debug session exited without hitting any breakpoint
- Debug view to see Adapter/RPC log messages
- Testing
  - Fake debug adapter
    - Fake requests & events

---

Release Notes:

- N/A

---------

Co-authored-by: Piotr Osiewicz <24362066+osiewicz@users.noreply.github.com>
Co-authored-by: Anthony Eid <hello@anthonyeid.me>
Co-authored-by: Anthony <anthony@zed.dev>
Co-authored-by: Piotr Osiewicz <peterosiewicz@gmail.com>
Co-authored-by: Piotr <piotr@zed.dev>
2025-03-18 12:55:25 -04:00
..
activity_indicator Debugger implementation (#13433) 2025-03-18 12:55:25 -04:00
anthropic Track cumulative token usage in assistant2 when using anthropic API (#26738) 2025-03-13 22:56:16 +00:00
askpass Git askpass (#25953) 2025-03-06 05:20:06 +00:00
assets Eliminate GPUI View, ViewContext, and WindowContext types (#22632) 2025-01-26 03:02:45 +00:00
assistant Use textDocument/codeLens data in the actions menu when applicable #2 (#26848) 2025-03-15 20:09:32 +00:00
assistant2 assistant2: Keep the tool selector open when toggling tools (#26994) 2025-03-18 15:30:05 +00:00
assistant_context_editor Debugger implementation (#13433) 2025-03-18 12:55:25 -04:00
assistant_eval assistant_tools: Add fetch tool (#26999) 2025-03-18 16:25:51 +00:00
assistant_settings assistant: Edit files tool (#26506) 2025-03-12 12:30:47 +00:00
assistant_slash_command Allow too many arguments (#26375) 2025-03-10 13:38:30 -06:00
assistant_slash_commands chore: Extract PromptStore out of prompt_library (#25837) 2025-03-01 00:34:28 +01:00
assistant_tool assistant edit tool: Track read buffers and notify model of user edits (#26952) 2025-03-17 21:50:16 +00:00
assistant_tools assistant_tools: Add fetch tool (#26999) 2025-03-18 16:25:51 +00:00
audio Eliminate GPUI View, ViewContext, and WindowContext types (#22632) 2025-01-26 03:02:45 +00:00
auto_update cx.background_executor().spawn(...) -> cx.background_spawn(...) (#25103) 2025-02-18 20:30:33 +00:00
auto_update_ui New excerpt controls (#24428) 2025-03-13 15:52:47 -06:00
aws_http_client Add aws_http_client and bedrock crates (#25490) 2025-02-24 20:28:20 +00:00
bedrock bedrock: Add Claude 3.7 Sonnet (#25583) 2025-02-25 13:52:42 -05:00
breadcrumbs Add user-visible output for remote operations (#25849) 2025-03-03 09:20:15 +00:00
buffer_diff git: Fix race condition when [un]staging hunks in quick succession (#26422) 2025-03-13 10:41:04 -07:00
call cx.background_executor().spawn(...) -> cx.background_spawn(...) (#25103) 2025-02-18 20:30:33 +00:00
channel Rust 1.85 (#25272) 2025-02-28 18:33:35 +01:00
cli cli: Support opening anonymous file descriptors via the cli on MacOS and Linux (#26744) 2025-03-13 20:53:47 -05:00
client Move buffer diff storage from BufferStore to GitStore (#26795) 2025-03-17 17:02:32 +00:00
clock chore: Use workspace fields for edition and publish (#23291) 2025-01-17 17:39:22 +01:00
collab Debugger implementation (#13433) 2025-03-18 12:55:25 -04:00
collab_ui Refine word completions (#26779) 2025-03-14 15:18:55 +00:00
collections chore: Use workspace fields for edition and publish (#23291) 2025-01-17 17:39:22 +01:00
command_palette cx.background_executor().spawn(...) -> cx.background_spawn(...) (#25103) 2025-02-18 20:30:33 +00:00
command_palette_hooks vim: :set support (#24209) 2025-02-11 04:55:40 +00:00
component component_preview: Add component pages (#26284) 2025-03-07 18:56:17 +00:00
component_preview Rework git toasts (#26420) 2025-03-11 21:39:29 +00:00
context_server assistant edit tool: Fix editing files in context (#26751) 2025-03-14 17:07:43 -03:00
context_server_settings Eliminate GPUI View, ViewContext, and WindowContext types (#22632) 2025-01-26 03:02:45 +00:00
copilot copilot: Handle sign out when copilot language server is not running (#26776) 2025-03-14 19:41:27 +05:30
credentials_provider Use the development credentials provider in development by default (#25273) 2025-02-20 19:07:16 +00:00
dap Debugger implementation (#13433) 2025-03-18 12:55:25 -04:00
dap_adapters Debugger implementation (#13433) 2025-03-18 12:55:25 -04:00
db cx.background_executor().spawn(...) -> cx.background_spawn(...) (#25103) 2025-02-18 20:30:33 +00:00
debugger_tools Debugger implementation (#13433) 2025-03-18 12:55:25 -04:00
debugger_ui Debugger implementation (#13433) 2025-03-18 12:55:25 -04:00
deepseek Add DeepSeek support (#23551) 2025-01-27 13:40:59 -05:00
diagnostics New excerpt controls (#24428) 2025-03-13 15:52:47 -06:00
docs_preprocessor Eliminate GPUI View, ViewContext, and WindowContext types (#22632) 2025-01-26 03:02:45 +00:00
editor Debugger implementation (#13433) 2025-03-18 12:55:25 -04:00
evals Unwind deprecated permalinks code (#26395) 2025-03-10 19:57:10 -06:00
extension Debugger implementation (#13433) 2025-03-18 12:55:25 -04:00
extension_api zed_extension_api: Release v0.3.0 (#26495) 2025-03-11 22:54:44 +00:00
extension_cli extension_cli: Make use of scrollbar_thumb.background a hard error (#25932) 2025-03-03 15:55:15 +00:00
extension_host Debugger implementation (#13433) 2025-03-18 12:55:25 -04:00
extensions_ui settings: Auto-update JSON schemas for settings when extensions are un/installed (#26633) 2025-03-13 16:50:07 +00:00
feature_flags Debugger implementation (#13433) 2025-03-18 12:55:25 -04:00
feedback Support SSH usernames which contain @ symbols (#25314) 2025-03-17 05:10:21 +00:00
file_finder workspace::Open: Highlight fuzzy matches (#26320) 2025-03-12 22:54:38 +02:00
file_icons Allow icon themes to provide their own file associations (#24926) 2025-02-15 00:35:13 +00:00
fs Move buffer diff storage from BufferStore to GitStore (#26795) 2025-03-17 17:02:32 +00:00
fsevent Deflake fs::test_event_stream_simple (#24013) 2025-01-30 23:53:36 -07:00
fuzzy Allow too many arguments (#26375) 2025-03-10 13:38:30 -06:00
git Move buffer diff storage from BufferStore to GitStore (#26795) 2025-03-17 17:02:32 +00:00
git_hosting_providers git_hosting_providers: Allow configuring additional hosting providers via settings (#26879) 2025-03-17 15:39:52 +00:00
git_ui Add missing commit event reporting (#26990) 2025-03-18 14:52:32 +00:00
go_to_line go_to_line: Fix goto line + mouse click jumps to previous scroll position (#26362) 2025-03-10 20:33:07 +05:30
google_ai Partially fix assistant onboarding (#25313) 2025-02-24 07:29:55 +00:00
gpui Add Ord and PartialOrd impls for gpui entity types (#26968) 2025-03-18 06:20:21 +00:00
gpui_macros Add seed argument to #[gpui::test] attribute macro (#26764) 2025-03-14 13:40:02 -03:00
gpui_tokio Make the gpui_tokio crate generic over the context it spawns (#23995) 2025-01-31 02:00:55 +00:00
html_to_markdown Eliminate GPUI View, ViewContext, and WindowContext types (#22632) 2025-01-26 03:02:45 +00:00
http_client chore: Extract http-client-tls crate (#26895) 2025-03-17 02:36:37 +00:00
http_client_tls chore: Extract http-client-tls crate (#26895) 2025-03-17 02:36:37 +00:00
image_viewer image_viewer: Hide breadcrumb (#25654) 2025-02-26 17:24:35 +01:00
indexed_docs Eliminate GPUI View, ViewContext, and WindowContext types (#22632) 2025-01-26 03:02:45 +00:00
inline_completion edit predictions: Show user if current project is open source (#24587) 2025-02-10 22:28:56 -03:00
inline_completion_button edit prediction: Add eager and subtle modes toggle to menu (#26680) 2025-03-13 12:46:22 -03:00
install_cli Fix missed renames in #22632 (#23688) 2025-01-26 23:37:34 +00:00
journal Worktree paths in git panel, take 2 (#26047) 2025-03-06 22:55:28 +00:00
language Debugger implementation (#13433) 2025-03-18 12:55:25 -04:00
language_extension Debugger implementation (#13433) 2025-03-18 12:55:25 -04:00
language_model Track cumulative token usage in assistant2 when using anthropic API (#26738) 2025-03-13 22:56:16 +00:00
language_model_selector Fix language model selector (#26138) 2025-03-05 12:48:10 -05:00
language_models copilot: Decouple copilot sign in from edit prediction settings (#26689) 2025-03-14 15:10:56 +05:30
language_selector language_selector: Improve lookup for language icons (#26376) 2025-03-14 20:13:59 +00:00
language_tools Make buffer search aware of search direction (#24974) 2025-03-04 19:27:37 -07:00
languages Debugger implementation (#13433) 2025-03-18 12:55:25 -04:00
livekit_api Change license of crates/livekit_api from AGPL to GPL (#25206) 2025-02-19 23:32:51 +00:00
livekit_client cx.background_executor().spawn(...) -> cx.background_spawn(...) (#25103) 2025-02-18 20:30:33 +00:00
livekit_client_macos Rename livekit_server to livekit_api (#24984) 2025-02-16 20:24:12 +00:00
lmstudio lmstudio: Support missing quantization in model metadata (#24054) 2025-01-31 22:28:11 +00:00
lsp Use textDocument/codeLens data in the actions menu when applicable #2 (#26848) 2025-03-15 20:09:32 +00:00
markdown Silence a couple of noisy logs (#26262) 2025-03-06 22:45:47 -05:00
markdown_preview Worktree paths in git panel, take 2 (#26047) 2025-03-06 22:55:28 +00:00
media chore: Use workspace fields for edition and publish (#23291) 2025-01-17 17:39:22 +01:00
menu keymap: Update Prev to Previous for consistency (#25909) 2025-03-03 17:44:49 +05:30
migrator migrator: Fix case where users see migration banner despite no diff changes (#26982) 2025-03-18 19:24:24 +05:30
mistral assistant: Add Mistral support (#24879) 2025-02-14 13:07:41 -05:00
multi_buffer Fix sticky header in last buffer of a multibuffer (#26944) 2025-03-17 18:39:57 +00:00
node_runtime node_runtime: Use user/global configuration when using system node installation (#26209) 2025-03-06 12:50:42 +01:00
notifications Rework git toasts (#26420) 2025-03-11 21:39:29 +00:00
ollama Eliminate GPUI View, ViewContext, and WindowContext types (#22632) 2025-01-26 03:02:45 +00:00
open_ai Update Assistant context limits (#25087) 2025-02-19 11:06:20 -05:00
outline Fix editor's outline view confirm not working before any queries have (#26761) 2025-03-14 07:19:43 +00:00
outline_panel New excerpt controls (#24428) 2025-03-13 15:52:47 -06:00
panel Revert "ui: Color cleanup (#26673)" (#26681) 2025-03-13 15:40:57 +00:00
paths Debugger implementation (#13433) 2025-03-18 12:55:25 -04:00
picker git_ui: Branch picker improvements (#26287) 2025-03-10 11:39:01 -04:00
prettier lsp: Use available workspace folders in initialize params (#25753) 2025-02-27 16:45:59 +01:00
project Debugger implementation (#13433) 2025-03-18 12:55:25 -04:00
project_panel Reveal always_included entries in Project Panel (#26197) 2025-03-15 01:42:11 +00:00
project_symbols Add user-visible output for remote operations (#25849) 2025-03-03 09:20:15 +00:00
prompt_library git_ui: Branch picker improvements (#26287) 2025-03-10 11:39:01 -04:00
prompt_store Fix issues in EditFilesTool, ListDirectoryTool and BashTool (#26647) 2025-03-13 09:41:27 +00:00
proto Debugger implementation (#13433) 2025-03-18 12:55:25 -04:00
recent_projects Debugger implementation (#13433) 2025-03-18 12:55:25 -04:00
refineable windows: Fix tests on Windows (#22616) 2025-02-05 14:30:09 +00:00
release_channel windows: Missing commit of #25412 (#25732) 2025-02-27 08:00:42 +00:00
remote Support SSH usernames which contain @ symbols (#25314) 2025-03-17 05:10:21 +00:00
remote_server Debugger implementation (#13433) 2025-03-18 12:55:25 -04:00
repl New excerpt controls (#24428) 2025-03-13 15:52:47 -06:00
reqwest_client chore: Extract http-client-tls crate (#26895) 2025-03-17 02:36:37 +00:00
rich_text Allow too many arguments (#26375) 2025-03-10 13:38:30 -06:00
rope Add support for auto-closing of JSX tags (#25681) 2025-03-06 08:36:10 -06:00
rpc extensions_ui: Add general structure for filtering extensions by what they provide (#24325) 2025-02-06 00:09:37 +00:00
schema_generator Improve schema_generator CLI (#25898) 2025-03-06 04:59:57 +00:00
scripting_tool Improve script tool description and add lines iterator to Lua file objects (#26529) 2025-03-12 07:58:11 +00:00
search New excerpt controls (#24428) 2025-03-13 15:52:47 -06:00
semantic_index Allow too many arguments (#26375) 2025-03-10 13:38:30 -06:00
semantic_version chore: Use workspace fields for edition and publish (#23291) 2025-01-17 17:39:22 +01:00
session cx.background_executor().spawn(...) -> cx.background_spawn(...) (#25103) 2025-02-18 20:30:33 +00:00
settings Debugger implementation (#13433) 2025-03-18 12:55:25 -04:00
settings_ui Fix UI font size changes not applying (#25307) 2025-02-21 06:24:02 -03:00
snippet Eliminate GPUI View, ViewContext, and WindowContext types (#22632) 2025-01-26 03:02:45 +00:00
snippet_provider snippets: Fix snippets not updating while containing comments (#23755) 2025-01-28 10:37:48 +01:00
snippets_ui Worktree paths in git panel, take 2 (#26047) 2025-03-06 22:55:28 +00:00
sqlez Debugger implementation (#13433) 2025-03-18 12:55:25 -04:00
sqlez_macros windows: Fix tests on Windows (#22616) 2025-02-05 14:30:09 +00:00
story gpui: Rename rounded_md to rounded_sm (#26228) 2025-03-06 17:57:31 +00:00
storybook keymap: Update Prev to Previous for consistency (#25909) 2025-03-03 17:44:49 +05:30
streaming_diff chore: Use workspace fields for edition and publish (#23291) 2025-01-17 17:39:22 +01:00
sum_tree git: Fix race condition when [un]staging hunks in quick succession (#26422) 2025-03-13 10:41:04 -07:00
supermaven Include prediction ID on edit prediction accepted/discarded events (#24480) 2025-02-07 22:06:37 +00:00
supermaven_api Eliminate GPUI View, ViewContext, and WindowContext types (#22632) 2025-01-26 03:02:45 +00:00
tab_switcher git_ui: Branch picker improvements (#26287) 2025-03-10 11:39:01 -04:00
task Debugger implementation (#13433) 2025-03-18 12:55:25 -04:00
tasks_ui Debugger implementation (#13433) 2025-03-18 12:55:25 -04:00
telemetry Git telemetry (#26222) 2025-03-06 10:56:28 -07:00
telemetry_events Introduce rating for assistant threads (#26780) 2025-03-14 14:41:50 +00:00
terminal Debugger implementation (#13433) 2025-03-18 12:55:25 -04:00
terminal_view Debugger implementation (#13433) 2025-03-18 12:55:25 -04:00
text Debugger implementation (#13433) 2025-03-18 12:55:25 -04:00
theme Debugger implementation (#13433) 2025-03-18 12:55:25 -04:00
theme_extension theme: Don't log errors for missing themes until extensions have loaded (#25098) 2025-02-18 17:47:25 +00:00
theme_importer Add schema_generator for generating JSON schemas (#23991) 2025-01-31 01:22:10 +00:00
theme_selector icon_theme_selector: Add footer and related docs (#25042) 2025-02-20 00:02:24 +00:00
time_format Add an undo button to the git panel (#24593) 2025-02-12 15:57:08 -07:00
title_bar git: Add an onboarding and banner flow (#26518) 2025-03-12 16:17:47 +00:00
toolchain_selector Allow too many arguments (#26375) 2025-03-10 13:38:30 -06:00
ui Debugger implementation (#13433) 2025-03-18 12:55:25 -04:00
ui_input Eliminate GPUI View, ViewContext, and WindowContext types (#22632) 2025-01-26 03:02:45 +00:00
ui_macros Add StatusToast & the ToastLayer (#26232) 2025-03-06 20:37:54 +00:00
util Debugger implementation (#13433) 2025-03-18 12:55:25 -04:00
util_macros Use line_endings macro for the edit tool tests (#26642) 2025-03-15 14:16:10 +08:00
vim Debugger implementation (#13433) 2025-03-18 12:55:25 -04:00
vim_mode_setting Eliminate GPUI View, ViewContext, and WindowContext types (#22632) 2025-01-26 03:02:45 +00:00
welcome Revert "ui: Color cleanup (#26673)" (#26681) 2025-03-13 15:40:57 +00:00
workspace Debugger implementation (#13433) 2025-03-18 12:55:25 -04:00
worktree worktree: Fix tracking of git status scans and re-enable tests (#26926) 2025-03-18 12:23:46 -04:00
zed Debugger implementation (#13433) 2025-03-18 12:55:25 -04:00
zed_actions Make repo and branch popovers extend up from their trigger buttons (#26950) 2025-03-17 15:05:17 -07:00
zeta Debugger implementation (#13433) 2025-03-18 12:55:25 -04:00