The V VS Code Extension provides V language support for Visual Studio Code.

Features:
Install V VS Code Extension.

The C/C++ Extension for Visual Studio Code provides visual conditional debugging.
Features:
RUN AND DEBUG panel (Debug Icon in left panel).Show all automatic debug configurations.Add config.C++ (GDB/LLDB)."program": "Enter the program name, e.g. \"${workspaceFolder}/a.out\"",
to point to your compiled application e.g. "program": "${workspaceFolder}/hello",
or a more flexible one "program": "${fileDirname}/${fileBasenameNoExtension}",
when you want to debug the current opened file.This will add a block to your .workspace file,
or create the file .vscode/launch.json:{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit:
// https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"name": "(lldb) Start",
"type": "cppdbg",
"request": "launch",
"program": "Enter the program name, e.g. \"${workspaceFolder}/a.out\"",
"args": [],
"stopAtEntry": false,
"cwd": "${fileDirname}",
"environment": [],
"externalConsole": false,
"MIMode": "lldb",
"preLaunchTask": "build"
}
]
}
Optional: use "program": "${fileDirname}/${fileBasenameNoExtension}" to debug
any current open source file with an existing binary with the same name but without any extension.Generally, you can manually compile the application with: v -b c -g hello.v -o hello,
or for short: v -g hello.v, and then call the debugger.
The -g option will add the needed debugging information.
You can find more debugging options in the docs.
VS Code provides a hook called preLaunchTask, which can be used to compile
the application automatically every time you call the debugger.
preLaunchTask launches
a task before the start of a debug session, set this attribute to the label of a task specified
in task.json (in the workspace's .vscode folder).
Or, this can be set to ${defaultBuildTask}, to use your default build task.
As explained, the "preLaunchTask": "build" needs to work with a .vscode/tasks.json
with a label named build.
{
// See https://go.microsoft.com/fwlink/?LinkId=733558
// for the documentation about the tasks.json format
"version": "2.0.0",
"tasks": [
{
"label": "build",
"type": "shell",
"command": "v",
"args": [
"-g", // add more compiler options here if necessary
"${relativeFile}" // or modify it according to your requirements
],
"group": "build",
"presentation": {
"reveal": "never"
},
"problemMatcher": {
"owner": "v",
"fileLocation": ["relative", "${workspaceFolder}"],
"pattern": {
"regexp": "^(.*):(\\d+):(\\d+):\\s+(warning|error):\\s+(.*)$",
"file": 1,
"line": 2,
"column": 3,
"severity": 4,
"message": 5
}
}
}
]
}
To allow your compiled application to be debugged. The application needs to include additional debugging information (DWARF).
> (lldb) Start, or use F5 to launch your application in debug mode.For all options look at the official
C/C++ Extension documentation.