VScode像Codeblocks一样,不启动调试和Debug直接运行
生活随笔
收集整理的這篇文章主要介紹了
VScode像Codeblocks一样,不启动调试和Debug直接运行
小編覺得挺不錯的,現(xiàn)在分享給大家,幫大家做個參考.
要是配置C++ 編譯環(huán)境,這邊走
用了VScode童鞋,都知道,寫C++是不保留窗口的,除非打上斷點或者:
這里給大家分享一種不需要,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)容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 全选快捷键是什么(的快捷键是什么)
- 下一篇: 数学--数论--HDU1576 A /