diff --git a/src/tests.ts b/src/tests.ts index 66b568a..3967878 100644 --- a/src/tests.ts +++ b/src/tests.ts @@ -128,12 +128,20 @@ export async function testDebugHandler( let args = [...test.cmd]; args.shift(); + const debugEnv = []; + /* convert from dict of key = value to array of {name: key, value: value} */ + if (test.env instanceof Object) { + for (const [key, val] of Object.entries(test.env)) { + debugEnv.push({ name: key, value: val }); + } + } + let debugConfiguration = { name: `meson-debug-${test.name}`, type: debugType, request: "launch", cwd: test.workdir || sourceDir, - env: test.env, + environment: debugEnv, program: test.cmd[0], args: args, };