Mac-VScode
1) 安装 xcode。
打开App Store,搜索xcode,进行下载安装。
2)执行命令:
xcode-select --install
3)安装VS Code
https://code.visualstudio.com/
4) 打开vs code。打开左侧扩展栏,安装c++扩展
5)c_cpp_properties.json文件
{
"configurations": [
{
"name": "Mac",
"includePath": [
"${workspaceFolder}/**",
"/Library/Developer/CommandLineTools/usr/include/c++/v1",
"/usr/local/include",
"/Library/Developer/CommandLineTools/usr/lib/clang/9.0.0/include",
"/Library/Developer/CommandLineTools/usr/include",
"/usr/include"
],
"defines": [],
"macFrameworkPath": [
"/System/Library/Frameworks",
"/Library/Frameworks"
],
"compilerPath": "/usr/bin/clang",
"cStandard": "c11",
"cppStandard": "c++17",
"intelliSenseMode": "clang-x64"
}
],
"version":
}
6)配置task.json
{
// See https://go.microsoft.com/fwlink/?LinkId=733558
// for the documentation about the tasks.json format
"version": "2.0.0",
"tasks": [
{
"label": "c++",
"command": "clang++",
"type": "shell",
"args": [
"./c++/hello.cpp",//根据需要修改
"-std=c++11",
"-g"
],
"presentation": {
"echo": true,
"reveal": "always",
"focus": false,
"panel": "shared"
}
}
]
}
7)配置launch.json
{
// 使用 IntelliSense 了解相关属性。
// 悬停以查看现有属性的描述。
// 欲了解更多信息,请访问: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"name": "c/c++ Launch",
"type": "cppdbg",
"request": "launch",
"program": "${workspaceFolder}/a.out",
"args": [],
"stopAtEntry": false,
"cwd": "${workspaceFolder}",
"environment": [],
"externalConsole": true,
"MIMode": "lldb",
"preLaunchTask":"c++"
}
]
}
8)开启调试
参考:https://www.cnblogs.com/xuanhun/p/9890931.html
Mac-VScode的更多相关文章
- 记录一次Mac VSCode运行Grpc模板项目
1.使用dotnet new grpc -o GrpcGreeter && cd GrpcGreeter && code . ,进入项目文件中,使用code .使用vs ...
- mac vscode 实用快捷键
cmd+del:光标左边删到头 cmd+fn+del:光标右侧删到头
- Visual Studio Code 使用心得
Visual Studio Code 使用心得 最好用的跨平台编辑器,没有之一! 修改编辑器的显示语言 起因:vsCode又升级了(1.13.0),重启之后发现熟悉的中文菜单没有了,而且设置文件 se ...
- .netCore数据库迁移
程序包管理器控制台下Nuget 命令: 初始迁移命令: add-migration init -Context DAL.ProductContext 全称:migrations add Initial ...
- flutter安装中的一些方法
1.配置flutter环境变量 进入终端 vim ~/.bash_profile export ANDROID_HOME=~Library/Android/sdk export PATH=$PATH: ...
- VS code开发工具的使用教程
前言 工欲善其事必先利其器,提高程序员的开发效率必须要有一个好的开发工具,当前最好的前端开发工具主要有VS code.sublime Text.Atom.Webstorm.Notepad++. VS ...
- 2016年最新mac下vscode配置golang开发环境支持debug
网上目前还找不到完整的mac下golang环境配置支持,本人配置成功,现在整理分享出来. mac最好装下xcode,好像有依赖关系安装Homebrew打开终端窗口, 粘贴脚本执行/usr/bin/ru ...
- 【翻译】在Mac上使用VSCode创建你的第一个Asp.Net Core应用
Setting Up Your Development Environment 设置你的开发环境 To setup your development machine download and inst ...
- Mac OS中使用VScode配置C语言开发环境
个人博客 chinazt.cc 闲话少叙,直奔主题 下载VSCode https://code.visualstudio.com/download 安装C/C++插件 需要两个插件: 1. cppto ...
- Mac环境下使用VSCode搭建Go开发环境
换新工作啦!!!开心一下.到了新公司一看,乖乖,全MAC办公,让我这只用过windows的土包子怎么活,而且公司的人都好高冷,于是自己摸索着搭建go语言开发环境了. go语言的ide挺多的,JetBr ...
随机推荐
- PHP+JS的信息提示弹窗
基于PHP函数的Msg信息提示框 1.可以设置弹出信息,跳转地址,跳转的时间,跳转的信息标题提示: 2.代码实例: <?php function ShowMsg($msg, $gourl,$ti ...
- day 97 VUE第一天
<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title> ...
- mongo数据库基本查询语句
D:\MongoDB\Server\3.4\bin>mongo MongoDB shell version v3.-g83c3022fe4 connecting to: mongodb://12 ...
- Java常用的几个Json库,性能强势对比!
作者:飞污熊 https://xncoding.com/2018/01/09/java/jsons.html 本篇通过JMH来测试一下Java中几种常见的JSON解析库的性能.每次都在网上看到别人说什 ...
- 61.Merge k Sorted Lists(合并k个排序链表)
Level: Hard 题目描述: Merge k sorted linked lists and return it as one sorted list. Analyze and descri ...
- HBase学习记录
HBase 使用docker搭建参考https://blog.csdn.net/baifanwudi/article/details/78498325 搭建好以后,网页端可以看到: terminal ...
- js高级编程思想
js惰性思想: 能够执行一次就搞定绝对不会执行第二次 function createXHR(){ var xhr=null, falg=false, ary=[ function(){ return ...
- 创建Uboot 环境变量 bin 文件
As we know, the bootloader stores its configuration into an area of the flash called the environment ...
- Ubuntu中安装jenkins+docker,实现项目部署
本人对于linux系统是个小白,恰逢公司新框架需要docker+jenkins部署项目,所以通过同事口述+一顿乱查,终于实现在虚拟机上搭建的ubuntu系统中 实现jenkins +docker 自动 ...
- test命令-linux shell 脚本
#!/bin/bash # This is program will check you file name,which sys has or not,end print types. #2019/0 ...