失眠网,内容丰富有趣,生活中的好帮手!
失眠网 > mac vscode运行c语言 mac下如何使用vscode调试C程序

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

时间:2020-04-16 04:40:35

相关推荐

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

电脑已经安装了Xcode、vscode

vscode也已经安装了如下插件

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

]

本人项目文件情况如下:

tasks.json

{

"version": "2.0.0",

"tasks": [

{

"label": "build hello world",

"type": "shell",

"command": "g++",

"args": [

"-g",

"main.cpp"

]

}

]

}

launch.json

{

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

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

// 欲了解更多信息,请访问: /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程序,谢谢~

如果觉得《mac vscode运行c语言 mac下如何使用vscode调试C程序》对你有帮助,请点赞、收藏,并留下你的观点哦!

本内容不代表本网观点和政治立场,如有侵犯你的权益请联系我们处理。
网友评论
网友评论仅供其表达个人看法,并不表明网站立场。