vscode文件配置

lanuch.json

cpp 复制代码
{
    "version": "0.2.0",
    "configurations": [

      {
        "name": "(gdb) 启动",
        "type": "cppdbg",
        "request": "launch",
        // "program": "输入程序名称,例如 ${workspaceFolder}/a.exe",
        "program": "${fileDirname}\\${fileBasenameNoExtension}.exe",
        "args": [],
        "stopAtEntry": false,
        "cwd": "${fileDirname}",
        "environment": [],
        "externalConsole": false,
        "MIMode": "gdb",
        "miDebuggerPath": "E:\\vscode\\mingw\\bin\\gdb.exe",
        "setupCommands": [
            {
                "description": "为 gdb 启用整齐打印",
                "text": "-enable-pretty-printing",
                "ignoreFailures": true
            },
            {
                "description": "将反汇编风格设置为 Intel",
                "text": "-gdb-set disassembly-flavor intel",
                "ignoreFailures": true
            }
        ]
      },

      {
        // "justMyCode":false,
        "name": "(gdb) Launch", 
        "type": "cppdbg", 
        "request": "launch", 
        "program": "${fileDirname}\\${fileBasenameNoExtension}.exe", 
        "args": [], 
        "stopAtEntry": false,
        "cwd": "${workspaceRoot}",
        "environment": [],
        "externalConsole": true, 
        "MIMode": "gdb",
        "miDebuggerPath": "E:\\vscode\\mingw\\bin\\gdb.exe",
        "preLaunchTask": "g++",
        "setupCommands": [
          {
            "description": "Enable pretty-printing for gdb",
            "text": "-enable-pretty-printing",
            "ignoreFailures": true
          }
        ]
      }
    ]
  }

tasks.json

cpp 复制代码
{
	"version": "2.0.0",
	"tasks": [
		{
			"type": "cppbuild",
			"label": "g++",
			"command": "E:/vscode/mingw/bin/g++.exe",
			"args": [
				"-fdiagnostics-color=always",
				"-g",
				"${file}",
				"-o",
				"${fileDirname}\\${fileBasenameNoExtension}.exe",
			],
			"options": {
				"cwd": "E:/vscode/mingw/bin"
			},
			"problemMatcher": [
				"$gcc"
			],
			"group": {
				"kind": "build",
				"isDefault": true
			},
			"detail": "编译器: E:/vscode/mingw/bin/g++.exe"
		}
	]
 

}

c_cpp_properties.json

cpp 复制代码
{
    "configurations": [
        {
            "name": "Win32",
            "includePath": [
                "${workspaceFolder}/**"
            ],
            "defines": [
                "_DEBUG",
                "UNICODE",
                "_UNICODE"
            ],
            "compilerPath": "E:/vscode/mingw/bin/g++.exe",
            "cStandard": "c17",
            "cppStandard": "gnu++14",
            "intelliSenseMode": "gcc-x64"
        }
    ],
    "version": 4
}
相关推荐
xtmatao35 分钟前
JAVA开发工具——IntelliJ IDEA
java·ide·intellij-idea
未来之窗软件服务2 小时前
【免费】会员管理系统——-智能编程——仙盟创梦IDE
ide·会员系统·智能编程·仙盟创梦ide
奔跑吧邓邓子3 小时前
解锁Vscode:C/C++环境配置超详细指南
c语言·c++·vscode·配置指南
向明天乄4 小时前
Maotu流程图编辑器:Vue3项目中的集成实战与自定义流程开发指南
javascript·编辑器·vue·流程图
大道随心4 小时前
【1】跨越技术栈鸿沟:字节跳动开源TRAE AI编程IDE的实战体验
ide·开源·ai编程
且白18 小时前
vsCode使用本地低版本node启动配置文件
前端·vue.js·vscode·编辑器
维克喇叭18 小时前
vscode 离线安装第三方库跳转库
ide·vscode·编辑器
alpszero19 小时前
在VSCode中使用Ultralytics扩展
vscode·yolo11
cnkeysky1 天前
vscode 配置 latex
vscode·latex
2401_858286111 天前
OS11.【Linux】vim文本编辑器
linux·运维·服务器·编辑器·vim