I use vscode to learn zig. I install zig language plugin on vscode currently, it can set breakpoint, step-in, step-out, works fine. But I can’t see any variables on the left panel of vscode(debugger). It will show line "traceback (most recent call last:)"
if I try to add a variable to watch.
My build option set in vscode: "build install --summary all".
I can use print function. But it would be better if we could debug and watch step by step with a debugger sometimes.
my vscode task.json
{
"version": "2.0.0",
"tasks": [
{
"label": "zig: build current file (for debugging)",
"command": "zig",
"args": [
"build",
"install",
"--summary",
"all"
],
"options": {
"cwd": "${workspaceFolder}"
},
"type": "shell"
}
]
}
my vscode launch.json
"configurations": [
{
"type": "lldb",
"request": "launch",
"name": "zig: debug current file",
"preLaunchTask": "zig: build current file (for debugging)",
"program": "${workspaceFolder}/zig-out/bin/${fileBasenameNoExtension}",
"args": [],
"cwd": "${workspaceFolder}"
}
]
These settings works fine when I involved with the other languages.
Any help would be nice.