I’m trying to find a decent setup for debugging tests using either the zig build test command or the zig test filename.zig command.
I do have debugging working for the main exe on windows using the following vscode config:
{
"version": "0.2.0",
"configurations": [
{
"name": "Application",
"type": "cppvsdbg",
"request": "launch",
"program": "${workspaceFolder}/zig-out/bin/Application.exe",
"args": [],
"stopAtEntry": false,
"cwd": "${workspaceFolder}/zig-out/bin/",
"environment": []
}
]
}
I have noticed the test.exe file gets build everytime to the zig-cache/o/hash dirs but it’s quite cumbersome to add an extra config and change the program path each time, also it’s unclear what exe I need to pick as there can be multiple test.exe files.
Has anyone else run into this issue and find a simple solution?
I’m using the nightly build of zig btw, if that matters.