VS Code Plugins And Configuration

简介: VS Code插件vscode-icons: 显示文件类型的图标project manager: 管理项目, 项目的保存加载与切换beautify: 控制缩进code runner: 执行代码debugger for chromeeslint: 代码规范检测include autocomplete: 头文件自动补全, json配置文件为c_cpp_properties.

VS Code插件

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

内置

  • 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都可以

目录
相关文章
|
Java Maven
Maven - Error:java: Annotation processing is not supported for module cycles. Please ensure that all
Maven - Error:java: Annotation processing is not supported for module cycles. Please ensure that all
1061 0
Maven - Error:java: Annotation processing is not supported for module cycles. Please ensure that all
|
5月前
|
Java Maven Spring
SpringBoot 系列之 Failed to execute goal org.apache.maven.plugins:maven-resources-plugin:3.2.0:resource
这篇文章描述了在使用Maven构建Spring Boot项目时遇到的`maven-resources-plugin`插件版本问题导致的编译失败,并提供了通过修改插件版本至3.1.0来解决这个问题的方法。
SpringBoot 系列之 Failed to execute goal org.apache.maven.plugins:maven-resources-plugin:3.2.0:resource
|
8月前
|
Java
springboot打包错误:Failed to execute goal org.apache.maven.plugins:maven-resources-plugin:3.2.0:resource
springboot打包错误:Failed to execute goal org.apache.maven.plugins:maven-resources-plugin:3.2.0:resource
98 0
IDEA添加Swagger2:Parameter 0 of method linkDiscoverers in org. springframework hateoas.config.Hateoasconfiguration required a single bean, but 15 were found:
IDEA添加Swagger2:Parameter 0 of method linkDiscoverers in org. springframework hateoas.config.Hateoasconfiguration required a single bean, but 15 were found
|
8月前
|
设计模式 人工智能 Java
Error: JavaFX runtime components are missing, and are required to run this application with Gradle e
Error: JavaFX runtime components are missing, and are required to run this application with Gradle e
263 1
Failed to execute goal maven-resources-plugin:3.2.0:resources Input length = 1 -> [Help 1]
Failed to execute goal maven-resources-plugin:3.2.0:resources Input length = 1 -> [Help 1]
127 0
|
缓存 IDE Go
已解决Gradle错误:“Unable to load class ‘org.gradle.api.plugins.MavenPlugin‘
已解决Gradle错误:“Unable to load class ‘org.gradle.api.plugins.MavenPlugin‘
1479 0
|
Java Maven
Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.10.1:compile (default-compil
maven-compliler-plugin版本与maven版本不一致,Maven版本太低或maven-compiler-plugin版本过高
3936 0
Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.10.1:compile (default-compil
No plugin found for prefix ‘doclint‘ in the current project
No plugin found for prefix ‘doclint‘ in the current project
145 0
|
Java Maven
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-resources-plugin:3.2.0:resources (default-resources) on project ei-qssso-admin: The plugin org.apache.maven.plugins:maven-resources-plugi n:3.2.0 requires Maven version 3.1.0 -> [Help 1]
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-resources-plugin:3.2.0:resources (default-resources) on project ei-qssso-admin: The plugin org.apache.maven.plugins:maven-resources-plugi n:3.2.0 requires Maven version 3.1.0 -> [Help 1] 问题处理
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-resources-plugin:3.2.0:resources (default-resources) on project ei-qssso-admin: The plugin org.apache.maven.plugins:maven-resources-plugi n:3.2.0 requires Maven version 3.1.0 -> [Help 1]

热门文章

最新文章

下一篇
开通oss服务