1. 程式人生 > >VSCODE 配置C++執行環境

VSCODE 配置C++執行環境

tasks.json


{ // See https://go.microsoft.com/fwlink/?LinkId=733558 // for the documentation about the tasks.json format "version": "0.1.0", "command": "g++", "isShellCommand": true, "args": [ "-g", "${file}", "-o"
, "${workspaceRoot}/${fileBasename}.out"], "showOutput": "always" }

launch.json


{ "version": "0.2.0", "configurations": [
{ "name": "(gdb) Launch", "type": "cppdbg", "request"
: "launch", "program": "${file}.out", "args": [], "stopAtEntry": false, "cwd": "${workspaceRoot}", "environment": [], "externalConsole": true, "MIMode": "gdb", "miDebuggerPath" : "/usr/bin/gdb", "setupCommands"
: [ { "description": "Enable pretty-printing for gdb", "text": "-enable-pretty-printing", "ignoreFailures": true } ] } ] }

配置之前安裝xterm,g++編譯器,gcc編譯器,clang,gdb編譯器