74d61aad7fe771adcf1e737f70fccd7ee835e321
I was trying to use Zed for Rust debugging on windows, but was getting this warning in debugger console: "Could not initialize Python interpreter - some features will be unavailable (e.g. debug visualizers)." As the warning suggests this led to bad debugging experience where the variables were not visualized properly in the "Variables" panel. After some investigation I found that the problem is that Zed silently failed to extract all files from the debug adapter package (https://github.com/vadimcn/codelldb/releases/download/v1.11.8/codelldb-win32-x64.vsix). Particularly `python-lldb` folder was missing, which caused the warning. The error occurred here: https://github.com/zed-industries/zed/blob/cf7c64d77f1806cdd34b3812bbf27681fb3cb905/crates/util/src/archive.rs#L47 And then gets ignored here: https://github.com/zed-industries/zed/blob/cf7c64d77f1806cdd34b3812bbf27681fb3cb905/crates/dap/src/adapters.rs#L323-L326 The simple fix is to update `async_zip` crate to version 0.0.18 where this issue appears to be fixed. I also added logging instead of silently ignoring the error, as I believe that would have helped to catch it earlier. To reproduce the original issue you can try to follow these steps: 0. (Optional) Remove/rename old codelldb adapter at `%localappdata%\Zed\debug_adapters\CodeLLDB`. Restart Zed. 1. Create a simple Rust project. Make sure you use gnu toolchain (target `x86_64-pc-windows-gnu`) ```rust fn world() -> String { "world".into() } fn main() { let w = world(); println!("hello {}", w); } ``` 2. Put a breakpoint on line 7 (`println`) 3. In the command palette choose "debugger: start" and then select "run *crate name*" Screenshot before the fix: <img width="893" height="411" alt="image" src="https://github.com/user-attachments/assets/78097690-b55e-4989-bfa4-20452560f9fc" /> <details> <summary>Console before the fix</summary> ``` Checking latest version of CodeLLDB... Downloading from https://github.com/vadimcn/codelldb/releases/download/v1.11.8/codelldb-win32-x64.vsix... Download complete Could not initialize Python interpreter - some features will be unavailable (e.g. debug visualizers). Console is in 'commands' mode, prefix expressions with '?'. warning: (x86_64) D:\repro\target\x86_64-pc-windows-gnu\debug\repro.exe unable to locate separate debug file (dwo, dwp). Debugging will be degraded. Launching: D:\repro\target\x86_64-pc-windows-gnu\debug\repro.exe Launched process 13836 from 'D:\repro\target\x86_64-pc-windows-gnu\debug\repro.exe' error: repro.exe [0x0000000000002074]: DIE has DW_AT_ranges(DW_FORM_sec_offset 0x000000000000001a) attribute, but range extraction failed (invalid range list offset 0x1a), please file a bug and attach the file at the start of this error message error: repro.exe [0x000000000000208c]: DIE has DW_AT_ranges(DW_FORM_sec_offset 0x0000000000000025) attribute, but range extraction failed (invalid range list offset 0x25), please file a bug and attach the file at the start of this error message error: repro.exe [0x00000000000020af]: DIE has DW_AT_ranges(DW_FORM_sec_offset 0x0000000000000030) attribute, but range extraction failed (invalid range list offset 0x30), please file a bug and attach the file at the start of this error message error: repro.exe [0x00000000000020c4]: DIE has DW_AT_ranges(DW_FORM_sec_offset 0x000000000000003b) attribute, but range extraction failed (invalid range list offset 0x3b), please file a bug and attach the file at the start of this error message error: repro.exe [0x00000000000020fc]: DIE has DW_AT_ranges(DW_FORM_sec_offset 0x0000000000000046) attribute, but range extraction failed (invalid range list offset 0x46), please file a bug and attach the file at the start of this error message error: repro.exe [0x0000000000002130]: DIE has DW_AT_ranges(DW_FORM_sec_offset 0x0000000000000046) attribute, but range extraction failed (invalid range list offset 0x46), please file a bug and attach the file at the start of this error message > ? w < {...} ``` </details> Screenshot after the fix: <img width="634" height="295" alt="image" src="https://github.com/user-attachments/assets/67e36a64-97d2-406c-9216-7ac5b01f4101" /> <details> <summary>Console after the fix</summary> ``` Checking latest version of CodeLLDB... Downloading from https://github.com/vadimcn/codelldb/releases/download/v1.11.8/codelldb-win32-x64.vsix... Download complete Console is in 'commands' mode, prefix expressions with '?'. Loading Rust formatters from C:\Users\Vasyl\.rustup\toolchains\1.91.1-x86_64-pc-windows-msvc\lib/rustlib/etc warning: (x86_64) D:\repro\target\x86_64-pc-windows-gnu\debug\repro.exe unable to locate separate debug file (dwo, dwp). Debugging will be degraded. Launching: D:\repro\target\x86_64-pc-windows-gnu\debug\repro.exe Launched process 10364 from 'D:\repro\target\x86_64-pc-windows-gnu\debug\repro.exe' error: repro.exe [0x0000000000002074]: DIE has DW_AT_ranges(DW_FORM_sec_offset 0x000000000000001a) attribute, but range extraction failed (invalid range list offset 0x1a), please file a bug and attach the file at the start of this error message error: repro.exe [0x000000000000208c]: DIE has DW_AT_ranges(DW_FORM_sec_offset 0x0000000000000025) attribute, but range extraction failed (invalid range list offset 0x25), please file a bug and attach the file at the start of this error message error: repro.exe [0x00000000000020af]: DIE has DW_AT_ranges(DW_FORM_sec_offset 0x0000000000000030) attribute, but range extraction failed (invalid range list offset 0x30), please file a bug and attach the file at the start of this error message error: repro.exe [0x00000000000020c4]: DIE has DW_AT_ranges(DW_FORM_sec_offset 0x000000000000003b) attribute, but range extraction failed (invalid range list offset 0x3b), please file a bug and attach the file at the start of this error message error: repro.exe [0x00000000000020fc]: DIE has DW_AT_ranges(DW_FORM_sec_offset 0x0000000000000046) attribute, but range extraction failed (invalid range list offset 0x46), please file a bug and attach the file at the start of this error message error: repro.exe [0x0000000000002130]: DIE has DW_AT_ranges(DW_FORM_sec_offset 0x0000000000000046) attribute, but range extraction failed (invalid range list offset 0x46), please file a bug and attach the file at the start of this error message > ? w < "world" ``` </details> This fixes #33753 Release Notes: - util: Fixed archive::extract_zip failing to extract some archives
Zed
Welcome to Zed, a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.
Installation
On macOS, Linux, and Windows you can download Zed directly or install Zed via your local package manager.
Other platforms are not yet available:
- Web (tracking issue)
Developing Zed
- Building Zed for macOS
- Building Zed for Linux
- Building Zed for Windows
- Running Collaboration Locally
Contributing
See CONTRIBUTING.md for ways you can contribute to Zed.
Also... we're hiring! Check out our jobs page for open roles.
Licensing
License information for third party dependencies must be correctly provided for CI to pass.
We use cargo-about to automatically comply with open source licenses. If CI is failing, check the following:
- Is it showing a
no license specifiederror for a crate you've created? If so, addpublish = falseunder[package]in your crate's Cargo.toml. - Is the error
failed to satisfy license requirementsfor a dependency? If so, first determine what license the project has and whether this system is sufficient to comply with this license's requirements. If you're unsure, ask a lawyer. Once you've verified that this system is acceptable add the license's SPDX identifier to theacceptedarray inscript/licenses/zed-licenses.toml. - Is
cargo-aboutunable to find the license for a dependency? If so, add a clarification field at the end ofscript/licenses/zed-licenses.toml, as specified in the cargo-about book.
Description
GPUI – Community Edition maintained by Oak Team
https://gpui-ce.github.io/
257 MiB
Languages
Rust
95.5%
WGSL
1.2%
Metal
1.1%
HLSL
1.1%
Python
0.7%
Other
0.3%