• 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": 4
    }

    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

  • 相关阅读:
    性能测试三:jmeter进阶之图形插件
    性能测试二:jmeter参数化+聚合报告
    性能测试一:jmeter基础入门
    pytest十六:allure2 生成 html 报告
    pytest十五:pytest-html 生成 html 报告
    Confluence 6 Cron 表达式
    Confluence 6 任务的类型
    Confluence 6 查看一个任务的执行历史
    Confluence 6 禁用或者重新启用一个任务
    Confluence 6 手动运行和修改
  • 原文地址:https://www.cnblogs.com/yrm1160029237/p/11787765.html
Copyright © 2020-2023  润新知