Skip to content

Fix test debug locator - #44

Open
lejmr wants to merge 2 commits into
zed-extensions:mainfrom
lejmr:fix-test-debug-locator
Open

Fix test debug locator#44
lejmr wants to merge 2 commits into
zed-extensions:mainfrom
lejmr:fix-test-debug-locator

Conversation

@lejmr

@lejmr lejmr commented Aug 5, 2026

Copy link
Copy Markdown

This fixes broken breakpoint in debug mode.. the test before only ran through without stopping on breakpoint.

lejmr added 2 commits August 5, 2026 18:44
`strip_prefix("-femit-bin=")` already returns the bare path, so the following
`split("=").nth(1)` only produced a value when the path itself contained a `=`.
Everywhere else it returned `None`, so the locator failed with "None of the
locators for task `zig test --test-no-exec` completed successfully" and
debugging a test was impossible.
The build task is spawned directly rather than through a shell, so the quotes
wrapping $ZED_CUSTOM_ZIG_TEST_NAME in the zig-test task template end up inside
the filter string. `zig test --test-filter "'demo'"` reports "All 0 tests
passed", so the debug session launched a binary containing no tests and exited
immediately. Each argument is already a single argv element, so no quoting is
needed.
@cla-bot

cla-bot Bot commented Aug 5, 2026

Copy link
Copy Markdown

We require contributors to sign our Contributor License Agreement, and we don't have @lejmr on file. You can sign our CLA at https://zed.dev/cla. Once you've signed, post a comment here that says '@cla-bot check'.

@lejmr

lejmr commented Aug 5, 2026

Copy link
Copy Markdown
Author

@cla-bot check

@cla-bot cla-bot Bot added the cla-signed label Aug 5, 2026
@cla-bot

cla-bot Bot commented Aug 5, 2026

Copy link
Copy Markdown

The cla-bot has been summoned, and re-checked this pull request!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant