Learning zig with ziglings. cant figure out debug with vscode

I am neither on windows nor using vscode, but I had it installed and gave it a try.
I have tested debugging using: CodeLLDB as an extension.
Open the project, switch to the “RUN AND DEBUG” sidebar and followed the prompt to create a lldb launch target.
Executing the code, breakpoints and variable output seems to all be working.
launch.json looks like this:

{
	"version": "0.2.0",
	"configurations": [
		{
			"type": "lldb",
			"request": "launch",
			"name": "Debug",
			"program": "${workspaceFolder}/zig-out/bin/{name-of-your-exe}",
			"args": [],
			"cwd": "${workspaceFolder}"
		}
	]
}

Everything is default other than the path to the exe.
I should mention I also use CodeLLDB as debug adapter from neovim and I am able to debug there as well.

5 Likes