Debugging a project with multiple source files on Linux. For more info checkout the official vscode guide . This code was tested on Ubuntu 18.04 running on WSL task.json { "tasks": [ { "type": "cppbuild", "label": "C/C++: g++ build active file", "command": "/usr/bin/g++", "args": [ "-g", "*.cpp", "-o", "${fileDirname}/${fileBasenameNoExtension}" ], "options": { "cwd": "${fileDirname}" }, "problemMatcher": [