VSCode配置C++环境编译环境_vscode看自己c++使用的标准_持续学习,不断沉淀的博客-CSDN博客
VS Code配置C/C++环境_哔哩哔哩_bilibili
小白自制用VScode配置C/C++环境_哔哩哔哩_bilibili
Vs Code开发C++全过程_哔哩哔哩_bilibili
vscode配置c/c++环境保姆级教程-清华大学行健书院学生科协_哔哩哔哩_bilibili
VsCode配置c/c++环境_TwcatL_tree的博客-CSDN博客 流程这个样子
VS Code 配置Python环境以及部分优化_哔哩哔哩_bilibili
后面俩带虚拟环境
04-vscode和虚拟环境_哔哩哔哩_bilibili
十分钟配置vscode+python,从下载到使用,一站式解析_哔哩哔哩_bilibili
选择用当前的虚拟环境
类似下面步骤
C/C++环境之launch.json、tasks.json、c_cpp_properties.json极简设置_二哈不甘平凡的博客-CSDN博客
可以用的配置文件
launch.json
{
"configurations": [
{
"name": "C/C++: g++.exe 生成和调试活动文件",
"type": "cppdbg",
"request": "launch",
"program": "${fileDirname}\\file_exe\\${fileBasenameNoExtension}.exe",//注意中间file_exe是自定义的可以名字不一样的存放可执行程序的文件夹名
"args":[],
//下面这两个配置能解决 开外部控制台秒退的问题,但是结果就是不能调试了。所以还是用上面默认的好
//秒退是因为程序跑完了,资源释放了
//解决办法 代码最后里面打个system("pause")用来暂停程序进程执行或者别的像cin.get()或getchar()等等
// "program":"C:\\Windows\\System32\\cmd.exe",
// "args": ["/c","${fileDirname}/file_exe/${fileBasenameNoExtension}.exe","&","pause"],
"stopAtEntry": false,
"cwd": "${fileDirname}",
"environment": [],
"externalConsole": true,//true调出外部控制台,false调内部终端
"MIMode": "gdb",
"miDebuggerPath": "D:\\mingw64\\bin\\gdb.exe",//自己mingw文件中bin目录下gdb.exe的路径,用/或\\
"setupCommands": [
{
"description": "为 gdb 启用整齐打印",
"text": "-enable-pretty-printing",
"ignoreFailures": true
},
{
"description": "将反汇编风格设置为 Intel",
"text": "-gdb-set disassembly-flavor intel",
"ignoreFailures": true
}
],
"preLaunchTask": "C/C++: g++.exe 生成活动文件"
}
],
"version": "2.0.0"
}
tasks.json
{
"tasks": [
{
"type": "cppbuild",
"label": "C/C++: g++.exe 生成活动文件",
"command": "D:\\mingw64\\bin\\g++.exe",
"args": [
"-fdiagnostics-color=always",
"-g",
"${file}",
"-o",
"${fileDirname}\\file_exe\\${fileBasenameNoExtension}.exe",
"-fexec-charset=GBK",
"-I",
"-std=c++17"
],
"options": {
"cwd": "${fileDirname}"
},
"problemMatcher": [
"$gcc"
],
"group": {
"kind": "build",
"isDefault": true
},
"detail": "调试器生成的任务。"
}
],
"version": "2.0.0"
}
上面俩是必须
下面俩选配
c_cpp_properties.json
{
"configurations": [
{
"name": "Win32",
"includePath": [
"${workspaceFolder}/**"
],
"defines": [
"_DEBUG",
"UNICODE",
"_UNICODE"
],
"compilerPath": "D:\\mingw64\bin\\g++.exe", //修改成自己bin目录下的g++.exe路径,注意使用 / 或 \\
"cStandard": "c11",
"cppStandard": "c++17",
"intelliSenseMode":"${default}"
}
],
"version": 4
}
setting.json
{
"files.associations": {
"array": "cpp",
"deque": "cpp",
"string": "cpp",
"unordered_map": "cpp",
"vector": "cpp",
"string_view": "cpp",
"initializer_list": "cpp",
"algorithm": "cpp",
"new": "cpp",
"thread": "cpp",
"iostream": "cpp",
"condition_variable": "cpp",
"ostream": "cpp",
"*.tcc": "cpp",
"iosfwd": "cpp",
"type_traits": "cpp",
"typeinfo": "cpp",
"set": "cpp"
}
}