淺談vscode中task.json和launch.json的關(guān)系
tasks.json
{ // See https://go.microsoft.com/fwlink/?LinkId=733558 // for the documentation about the tasks.json format "version": "2.0.0", "tasks": [ { "label": "dog", "type": "shell", "command": "g++", "args": ["-g", "${file}", "-std=c++11", "-o", "${fileBasenameNoExtension}.out"] //相當(dāng)于 g++ -g main.cpp -std=c++11 -o main.out } ] }
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": "(gdb) Launch", "type": "cppdbg", "request": "launch", "program": "${workspaceFolder}/${fileBasenameNoExtension}.out", "args": [], "stopAtEntry": false, "cwd": "${workspaceFolder}", "environment": [], "externalConsole": false, //如果不要窗口彈出,在ide中顯示,就設(shè)置成 false "MIMode": "gdb", "preLaunchTask": "dog", //表示預(yù)先生成一個中間文件,用于g++運行 "setupCommands": [ { "description": "Enable pretty-printing for gdb", "text": "-enable-pretty-printing", "ignoreFailures": true } ] } ] }
坐標(biāo)的label要跟 右邊的 "preLaunchTask"對應(yīng)。
"program": "${workspaceFolder}/${fileBasenameNoExtension}.out",則是制定要運行或者調(diào)試的可執(zhí)行文件
到此這篇關(guān)于淺談vscode中task.json和launch.json的關(guān)系的文章就介紹到這了,更多相關(guān)vscode task.json和launch.json內(nèi)容請搜索腳本之家以前的文章或繼續(xù)瀏覽下面的相關(guān)文章希望大家以后多多支持腳本之家!
相關(guān)文章
設(shè)計引導(dǎo)--一個鴨子游戲引發(fā)的設(shè)計理念(多態(tài),繼承,抽象,接口,策略者模式)
設(shè)計引導(dǎo)--一個鴨子游戲引發(fā)的設(shè)計多態(tài),繼承,抽象,接口,策略者模式;這篇博文是從實際生活中,提煉出來的設(shè)計理念,它現(xiàn)在是骨架,現(xiàn)在我加以代碼實例,完成程序的血肉,以求讓大家活生生的體會設(shè)計中的精髓2013-01-01插件下載安裝系列Eclipse/IDEA/谷歌/火狐安裝插件
這篇文章主要介紹了插件下載安裝系列Eclipse/IDEA/谷歌/火狐,本文通過圖文并茂的形式給大家介紹的非常詳細(xì),對大家的學(xué)習(xí)或工作具有一定的參考借鑒價值,需要的朋友可以參考下2020-10-10詳解git submodule HEAD detached 的問題
這篇文章主要介紹了詳解git submodule HEAD detached 的問題,文中通過示例代碼介紹的非常詳細(xì),對大家的學(xué)習(xí)或者工作具有一定的參考學(xué)習(xí)價值,需要的朋友們下面隨著小編來一起學(xué)習(xí)學(xué)習(xí)吧2020-08-08