diff --git a/src/tests.ts b/src/tests.ts index c6365fb1..2770915b 100644 --- a/src/tests.ts +++ b/src/tests.ts @@ -115,7 +115,8 @@ export async function testDebugHandler( return; } - let configDebugOptions = extensionConfiguration("debugOptions"); + const configDebugOptions = extensionConfiguration("debugOptions"); + const sourceDir = workspaceState.get("mesonbuild.sourceDir")!; /* We already figured out which tests we want to run. * We don't use the actual test either way, as we don't get the result here... */ @@ -127,7 +128,7 @@ export async function testDebugHandler( name: `meson-debug-${test.name}`, type: debugType, request: "launch", - cwd: test.workdir || buildDir, + cwd: test.workdir || sourceDir, env: test.env, program: test.cmd[0], args: args,