mac vscode运行c语言,mac下如何使用vscode调试C程序

电脑已经安装了Xcode、vscode

vscode也已经安装了如下插件

bVbhmsA?w=844&h=124

每次点击调试的时候,总是出现这个界

bVbhmsB?w=3358&h=2098

]

本人项目文件情况如下:

bVbhmsN?w=3358&h=2098

tasks.json

{

"version": "2.0.0",

"tasks": [

{

"label": "build hello world",

"type": "shell",

"command": "g++",

"args": [

"-g",

"main.cpp"

]

}

]

}

launch.json

{

// 使用 IntelliSense 了解相关属性。

// 悬停以查看现有属性的描述。

// 欲了解更多信息,请访问: https://go.microsoft.com/fwlink/?linkid=830387

"version": "0.2.0",

"configurations": [

{

"name": "(lldb) Launch",

"type": "cppdbg",

"request": "launch",

"program": "enter program name, for example ${workspaceFolder}/a.out",

"args": [],

"stopAtEntry": false,

"cwd": "${workspaceFolder}",

"environment": [],

"externalConsole": true,

"MIMode": "lldb"

}

]

}

c_cpp_properties.json

{

"configurations": [

{

"name": "Mac",

"includePath": [

"${workspaceFolder}/**"

],

"defines": [],

"macFrameworkPath": [

"/System/Library/Frameworks",

"/Library/Frameworks"

],

"compilerPath": "/usr/bin/clang",

"cStandard": "c11",

"cppStandard": "c++17",

"intelliSenseMode": "clang-x64"

}

],

"version": 4

}

请教下需要怎么弄,才可以在vscode里面编写 并且调试、运行C程序,谢谢~

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值