日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 > 编程资源 > 编程问答 >内容正文

编程问答

VScode像Codeblocks一样,不启动调试和Debug直接运行

發(fā)布時間:2023/12/15 编程问答 23 豆豆
生活随笔 收集整理的這篇文章主要介紹了 VScode像Codeblocks一样,不启动调试和Debug直接运行 小編覺得挺不錯的,現(xiàn)在分享給大家,幫大家做個參考.

要是配置C++ 編譯環(huán)境,這邊走
用了VScode童鞋,都知道,寫C++是不保留窗口的,除非打上斷點或者:

system("pause");

這里給大家分享一種不需要,F5或者Ctrl+F5的方法,可以使用VScode保留CMD窗口,方法非常簡單,當然我的配置方法也非常簡單。
這里這里

這里進入正題:
安裝插件



配置插件

完事了,就這么簡單,編譯很快,不過沒有Debug,想Debug還是F5,沒有影響的,直接編譯運行是F6,完事,完事撒花。

如果不可以使用的話,點我上邊的鏈接,或者跟我對一下json文件!

c_cpp_properties.json

{"configurations": [{"name": "Win32","includePath": ["${workspaceFolder}/**","C:/MinGW/include/*"],"defines": ["_DEBUG","UNICODE","_UNICODE"],"compilerPath": "C:/MinGW/bin/gcc.exe","cStandard": "c11","cppStandard": "c++17","intelliSenseMode": "gcc-x64"}],"version": 4 }

launch.json

{"version": "0.2.0","configurations": [{"name": "(gdb) Launch","type": "cppdbg","request": "launch","targetArchitecture": "x86","program": "${fileDirname}\\${fileBasenameNoExtension}.exe","miDebuggerPath": "c:\\MinGW\\bin\\gdb.exe","args": [],"stopAtEntry": false,"cwd": "${fileDirname}","externalConsole": true,"preLaunchTask": "g++"}] }

settings.json

{"files.associations": {"vector": "cpp","random": "cpp","iostream": "cpp","array": "cpp","atomic": "cpp","*.tcc": "cpp","bitset": "cpp","cctype": "cpp","cfenv": "cpp","charconv": "cpp","chrono": "cpp","cinttypes": "cpp","clocale": "cpp","cmath": "cpp","codecvt": "cpp","complex": "cpp","condition_variable": "cpp","csetjmp": "cpp","csignal": "cpp","cstdarg": "cpp","cstddef": "cpp","cstdint": "cpp","cstdio": "cpp","cstdlib": "cpp","cstring": "cpp","ctime": "cpp","cuchar": "cpp","cwchar": "cpp","cwctype": "cpp","deque": "cpp","forward_list": "cpp","list": "cpp","unordered_map": "cpp","unordered_set": "cpp","exception": "cpp","algorithm": "cpp","functional": "cpp","iterator": "cpp","map": "cpp","memory": "cpp","memory_resource": "cpp","numeric": "cpp","optional": "cpp","ratio": "cpp","regex": "cpp","set": "cpp","string": "cpp","string_view": "cpp","system_error": "cpp","tuple": "cpp","type_traits": "cpp","utility": "cpp","fstream": "cpp","future": "cpp","initializer_list": "cpp","iomanip": "cpp","iosfwd": "cpp","istream": "cpp","limits": "cpp","mutex": "cpp","new": "cpp","ostream": "cpp","scoped_allocator": "cpp","shared_mutex": "cpp","sstream": "cpp","stdexcept": "cpp","streambuf": "cpp","thread": "cpp","typeindex": "cpp","typeinfo": "cpp","valarray": "cpp"},"editor.fontFamily": "Consolas, 'Fira code', monospace","C_Cpp.errorSquiggles": "Disabled" }

tasks.json

{"version": "2.0.0","command": "g++","type": "shell","presentation": {"echo": true,"reveal": "always","focus": false,"panel": "shared","showReuseMessage": true,"clear": false},"args": ["-g", "${file}", "-o", "${fileDirname}\\${fileBasenameNoExtension}.exe"],"problemMatcher": {"owner": "cpp","fileLocation": ["relative", "${workspaceRoot}"],"pattern": {"regexp": "^(.*):(\\d+):(\\d+):\\s+(warning|error):\\s+(.*)$","file": 1,"line": 2,"column": 3,"severity": 4,"message": 5}} }

總結(jié)

以上是生活随笔為你收集整理的VScode像Codeblocks一样,不启动调试和Debug直接运行的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網(wǎng)站內(nèi)容還不錯,歡迎將生活随笔推薦給好友。