This repository was archived by the owner on Nov 25, 2025. It is now read-only.

Description
When running Zig tests from the VS Code extension:
- The Run profile uses the workspace folder as
cwd (via getWorkspaceFolder(...)), which matches how zig test is usually run from the project root.
- The Debug profile always uses the test file directory as
cwd.
In src/zigTestRunnerProvider.ts, debugTest builds the test binary and then starts the debugger with:
const debugConfig: vscode.DebugConfiguration = {
type: debugAdapter,
name: `Debug ${testItem.label}`,
request: "launch",
program: testBinaryPath,
cwd: path.dirname(testItem.uri.fsPath),
stopAtEntry: false,
};
This makes std.fs.cwd() inside tests differ between Run and Debug (e.g. .../project/src vs .../project), and there is currently no setting to change this behavior (e.g. zig.debugTestArgs does not affect cwd).