Figured it out: to run the test executable in a debugger, first run zig build test, then a test executable will be in the cache dir:
zig build test
$ find zig-cache -name test zig-cache/o/31202ceebbfdf2cf8ee2be9565e64183/test
An example launch.json using the CodeLLDB extension:
{ "version": "0.2.0", "configurations": [ { "type": "lldb", "request": "launch", "name": "Debug test runner", "program": "${workspaceFolder}/zig-cache/o/31202ceebbfdf2cf8ee2be9565e64183/test", "args": ["src/main.zig"], "cwd": "${workspaceFolder}" } ] }
Now try hitting some breakpoints in your tests- it works for me.
Tried this today, but there's nothing in there called test. Have you found a solution that works with 0.11?
Are you sure you want to hide this comment? It will become hidden in your post, but will still be visible via the comment's permalink.
Hide child comments as well
Confirm
For further actions, you may consider blocking this person and/or reporting abuse
Take off every Zig!
Figured it out: to run the test executable in a debugger, first run
zig build test
, then a test executable will be in the cache dir:An example launch.json using the CodeLLDB extension:
Now try hitting some breakpoints in your tests- it works for me.
Tried this today, but there's nothing in there called test. Have you found a solution that works with 0.11?