zoukankan      html  css  js  c++  java
  • VS Code Plugins And Configuration

    VS Code插件

    • vscode-icons: 显示文件类型的图标
    • project manager: 管理项目, 项目的保存加载与切换
    • beautify: 控制缩进
    • code runner: 执行代码
    • debugger for chrome
    • eslint: 代码规范检测
    • include autocomplete: 头文件自动补全, json配置文件为c_cpp_properties.json, 在includePath添加需要的头文件路径即可
    • indent-rainbow: 显示缩进
    • Path Intellisense: 路径补全

    内置

    • format document: 该命令控制全局缩进

    快捷键

    • ctrl + tab: 选择历史文件
    • shift + cmd + p: 显示所有命令
    • cmd + n: 创建新文件到huffer中
    • cmd + s: 将buffer中的文件保存到指定目录下
    • 几乎所有的软件都支持的标签切换: shift + cmd + [ 以及 shift + cmd + ]
    • shift + cmd + V: 打开markdownd的预览
    • ctrl + shift + b: 编译, 根据task.json, 如果没有创建, 找模板
    • 编译运行 shift + cmd + b
    
    {
        "version": "2.0.0",
        "tasks": [
            {
                "label": "compile", # 用于表示和引用task
                "command": "g++", # 命令名
                "args": ["${file}"] # 命令的参数, 有时使用的参数无效直接将该参数放到"command"中
            },
            {
                "label": "run",
                "args": ["build"],
                "options": {
                    "cwd": "${workspaceRoot}/server"
                }
            },
            {   # 同时启动两个task
                "label": "Build",
                "dependsOn": ["compile", "run"],
                "group": [
                    "kind": "build",
                    "isDefault": true
                ]
            }
        ]
    }
    
    还有group选项, 有test或者build两个值, 使用命令run build task或者run test task
    
    • python: select interpretor --> 选择python解释器

    • launch.json使用默认的就好, 单击左侧的debug图标, 点击齿轮自动生成模板, 回到python源码文件, F5进行debug

    • windows中想要debugC程序就做梦去吧

    • 建议在windows中下载TDM-GCC配置好gcc, g++和gdb, vscode下载code runner插件

    • 但是在*nix中debug和build都可以

  • 相关阅读:
    SQL跨服查询
    SQL时间函数
    MFC控件添加变量,control和value的区别
    error LNK2001 unresolved external symbol
    VS中C++代码折叠
    ERROR 2003 (HY000): Can't connect to MySQL server
    vs2012换肤功能,vs2012主题及自定义主题
    MFC、SDK和API有什么区别
    寻找子字符串int find_substr(char *s1, char *s2)
    document.title 跑马灯效果
  • 原文地址:https://www.cnblogs.com/megachen/p/9504593.html
Copyright © 2011-2022 走看看