码迷,mamicode.com
首页 > 编程语言 > 详细

vs code debug c++ java (mac)

时间:2018-11-07 19:56:14      阅读:233      评论:0      收藏:0      [点我收藏+]

标签:shell   inf   mem   ios   pac   pat   using   mes   use   

C++

技术分享图片

技术分享图片

 

{
    // Use IntelliSense to learn about possible attributes.
    // Hover to view descriptions of existing attributes.
    // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
    "version": "0.2.0",
    "configurations": [
        {
            "name": "(lldb) Launch",
            "type": "cppdbg",
            "request": "launch",
            "program": "${workspaceFolder}/a.out",
            "args": [],
            "stopAtEntry": false,
            "cwd": "${workspaceFolder}",
            "environment": [],
            "externalConsole": false,
            "MIMode": "lldb",
            "preLaunchTask": "build foocpp",
        }
    ]
}

 

{
    // See https://go.microsoft.com/fwlink/?LinkId=733558
    // for the documentation about the tasks.json format
    "version": "2.0.0",
    "tasks": [
        {
            "label": "build foocpp",
            "type": "shell",
            "command": "g++",
            "args": [
                "-g","-std=c++14", "${workspaceRoot}/*.cpp"
            ],
            "group": {
                "kind": "build",
                "isDefault": true
            }
        }
    ]
}
#include<iostream>
#include<memory>
#include "foo.h"
using namespace std;
int main(){
    shared_ptr<int> p = make_shared<int>(1); 
    unique_ptr<float> u = make_unique<float>(2.0);
    auto x =1;
    std::cout<<"Hello World!";
    for(int i=0;i<100;++i){
        std::cout<<i<<\n;
    }
    return 0;
}

 

 

Java

技术分享图片

 

技术分享图片

 

技术分享图片

 

vs code debug c++ java (mac)

标签:shell   inf   mem   ios   pac   pat   using   mes   use   

原文地址:https://www.cnblogs.com/Searchor/p/9924659.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!