Last active
August 6, 2017 10:00
-
-
Save jenglamlow/f6f37dc052fe65d1c4b37eb219684ef4 to your computer and use it in GitHub Desktop.
Visual Studio Code (v1.14) C++ build project settings. F7 to build, F8 to build and run, F5 to Debug. This tasks setting is to build dedicated binary for the selected cpp file. Useful for quick C++ coding testing or algorithm practise.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| "version": "0.2.0", | |
| "configurations": [ | |
| { | |
| "name": "C++ Launch", | |
| "type": "cppdbg", | |
| "request": "launch", | |
| "program": "${workspaceRoot}/${fileBasenameNoExtension}", | |
| "args": [], | |
| "stopAtEntry": false, | |
| "cwd": "${workspaceRoot}", | |
| "environment": [], | |
| "externalConsole": true, | |
| "linux": { | |
| "MIMode": "gdb", | |
| "setupCommands": [ | |
| { | |
| "description": "Enable pretty-printing for gdb", | |
| "text": "-enable-pretty-printing", | |
| "ignoreFailures": true | |
| } | |
| ] | |
| }, | |
| "osx": { | |
| "MIMode": "lldb" | |
| }, | |
| "windows": { | |
| "MIMode": "gdb", | |
| "setupCommands": [ | |
| { | |
| "description": "Enable pretty-printing for gdb", | |
| "text": "-enable-pretty-printing", | |
| "ignoreFailures": true | |
| } | |
| ] | |
| } | |
| }, | |
| { | |
| "name": "C++ Attach", | |
| "type": "cppdbg", | |
| "request": "attach", | |
| "program": "${workspaceRoot}/${fileBasenameNoExtension}", | |
| "processId": "${command:pickProcess}", | |
| "linux": { | |
| "MIMode": "gdb", | |
| "setupCommands": [ | |
| { | |
| "description": "Enable pretty-printing for gdb", | |
| "text": "-enable-pretty-printing", | |
| "ignoreFailures": true | |
| } | |
| ] | |
| }, | |
| "osx": { | |
| "MIMode": "lldb" | |
| }, | |
| "windows": { | |
| "MIMode": "gdb", | |
| "setupCommands": [ | |
| { | |
| "description": "Enable pretty-printing for gdb", | |
| "text": "-enable-pretty-printing", | |
| "ignoreFailures": true | |
| } | |
| ] | |
| } | |
| } | |
| ] | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| "version": "2.0.0", | |
| "presentation": { | |
| "reveal": "always", | |
| "panel": "shared" | |
| }, | |
| "suppressTaskName": true, | |
| "tasks": [ | |
| { | |
| "taskName": "Build", | |
| "command": "g++", | |
| "args": [ | |
| "-std=c++11", | |
| "-O2", | |
| "-Wall", | |
| "-g", | |
| "${fileBasename}", | |
| "-lstdc++", | |
| "-o", | |
| "${fileBasenameNoExtension}" | |
| ], | |
| "problemMatcher": { | |
| "owner": "cpp", | |
| "fileLocation": [ | |
| "relative", | |
| "${workspaceRoot}" | |
| ], | |
| "pattern": { | |
| "regexp": "^(.*):(\\d+):(\\d+):\\s+(warning|error):\\s+(.*)$", | |
| "file": 1, | |
| "line": 2, | |
| "column": 3, | |
| "severity": 4, | |
| "message": 5 | |
| } | |
| }, | |
| "group": { | |
| "kind": "build", | |
| "isDefault": true | |
| } | |
| }, | |
| { | |
| "taskName": "Run", | |
| "dependsOn": [ | |
| "Build" | |
| ], | |
| "command": "./${fileBasenameNoExtension}", | |
| "type": "shell", | |
| "args": [] | |
| }, | |
| { | |
| "taskName": "Build and Run", | |
| "dependsOn": [ | |
| "Build", | |
| "Run" | |
| ], | |
| "group": { | |
| "kind": "test", | |
| "isDefault": true | |
| } | |
| } | |
| ] | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment