Skip to content

Instantly share code, notes, and snippets.

@MaxDac
Last active February 11, 2024 19:02
Show Gist options
  • Save MaxDac/1e18747cbcb98b851ae66fffaabe64e9 to your computer and use it in GitHub Desktop.
Save MaxDac/1e18747cbcb98b851ae66fffaabe64e9 to your computer and use it in GitHub Desktop.
Zig VSCode tasks.json
{
"version": "0.2.0",
"configurations": [
{
"type": "lldb",
"request": "launch",
"name": "Debug",
"program": "${workspaceFolder}/zig-out/bin/<your-project-name>",
"args": [],
"cwd": "${workspaceFolder}",
"preLaunchTask": "zig build"
},
{
"type": "lldb",
"request": "launch",
"name": "Debug test",
"program": "${workspaceFolder}/zig-out/bin/${fileBasenameNoExtension}test",
"args": [],
"cwd": "${workspaceFolder}",
"preLaunchTask": "build zig test"
}
]
}
{
// See https://go.microsoft.com/fwlink/?LinkId=733558
// for the documentation about the tasks.json format
"version": "2.0.0",
"tasks": [
{
"label": "zig build",
"type": "shell",
"command": "zig build",
"presentation": {
"echo": true,
"reveal": "always",
"focus": false,
"panel": "shared",
"showReuseMessage": true,
"clear": false
},
"problemMatcher": [],
"group": {
"kind": "build",
"isDefault": true
}
},
{
"label": "build zig test",
"type": "shell",
"command": "zig test -femit-bin=zig-out/bin/${fileBasenameNoExtension}test ${relativeFile}"
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment