Visual Studio Code 开发环境

Visual Studio Code 开发环境

基础配置

插件

  1. Chinese (Simplified) Language Pack for Visual Studio Code(中文语言包)
  2. Beautify——代码美化文件
  3. Bracket Pair Colorizer——每一对括号用不同颜色区别 (括号强迫症必备)

微信小程序环境

插件

  1. 小程序开发助手

  2. CSS Tree——用于生成样式名

    使用方法:

    1. Ctrl+Shift+P 打开命令面板
    2. 输入css,找到CSS Tree插件,按回车
    3. 跳出来的新窗口就是样式名
    4. 注意!可能要样式名可能有错误,可能需要手动修改部分
  3. minapp——代码补全(小程序开发助手可能不够用)

  4. Easy LESS——在vs code 写less必备

    使用方法:(微信小程序不支持原生less,需要修改配置文件)

    1. 修改配置

          "less.compile": {
              // 将less 文件生成 .wxss 文件
              "outExt": ".wxss"
          },
      

C/C++环境

编译环境

  1. 需要先安装编辑环境Ming-W64 自动安装编译Ming环境-AutoVsCEnv WPF
  2. 配置VScodeC语言C++开发环境教程
  3. 注意 编译过程中如果出现中文乱码,将文件编码改为GBK

插件

  1. C/C++——在vs code 写C/C++必备

  2. C/C++ Compile Run —— 启动C/C++(快捷键F6)

    使用方法:

    1. 直接安装即可,编译时,在vs code底部弹出控制台
    2. 可在扩展设置将:C-cpp-compile-run: Run-in-external-terminal 勾选(Run in a new external terminal),这样可以在编译时将弹出一个黑框框控制台。

配置文件

  1. 找到 自动编译环境过程中 新创建的文件夹:.vscode(c/cpp,代码存放的那个文件夹)

  2. 将里面的四个配置文件(如果没有,自己新创建)修改为以下配置

    1. c_cpp_properties.json

      includePath,compilerPath 注意!要改为自己的路径名

      {
          "configurations": [
              {
                  "name": "Win32",
                  "includePath": [
                      "${workspaceFolder}/**",
                      // 改为自己的路径名
                      "E:/MinGW/include/*"
                  ],
                  "defines": [
                      "_DEBUG",
                      "UNICODE",
                      "_UNICODE"
                  ],
                  "compilerPath": 
                  // 改为自己的路径名
                  "E:/MinGW/bin/gcc.exe",
                  "cStandard": "c11",
                  "cppStandard": "c++17",
                  "intelliSenseMode": "gcc-x64"
              }
          ],
          "version": 4
      }
      
    2. launch.json

      {
          "version": "0.2.0",
          "configurations": [
              {
                  "name": "Debug",
                  "type": "cppdbg",
                  "request": "launch",
                  "program": "${workspaceFolder}/${fileBasenameNoExtension}.exe",
                  "args": [],
                  "stopAtEntry": false,
                  "cwd": "${workspaceFolder}",
                  "environment": [],
                  "externalConsole": true,
                  "MIMode": "gdb",
                  "miDebuggerPath": "E:/MinGW/bin/gdb.exe",
                  "setupCommands": [
                      {
                          "description": "Enable pretty-printing for gdb",
                          "text": "-enable-pretty-printing",
                          "ignoreFailures": false
                      }
                  ],
                  "preLaunchTask": "build & debug file"
              }
          ]
      }
      
    3. settings.json

      {
          "files.associations": {
              "*.cjson": "jsonc",
              "*.wxss": "css",
              "*.wxs": "javascript",
              "iostream": "cpp",
              "ostream": "cpp",
              "*.tcc": "cpp",
              "cstddef": "cpp",
              "istream": "cpp"
          }
      }
      
    4. tasks.json

      {
        "version": "2.0.0",
        "tasks": [
          {
            "label": "build & debug file",
            "type": "shell",
            "command": "g++",
            "args": [
              "-g",
              "-o",
              "${fileBasenameNoExtension}",
              "${file}"
            ],
            "group": {
              "kind": "build",
              "isDefault": true
            }
          },
          {
            "label": "build & run file",
            "type": "shell",
            "command": "g++",
            "args": [
              "-o",
              "${fileBasenameNoExtension}",
              "${file}"
            ],
            "group": {
              "kind": "build",
              "isDefault": true
            }
          }
        ]
      }
      

web前端

  1. 等待更新
  2. csdn-Vscode web 前端 常用插件
  3. segmentfault-VSCode插件推荐 Web前端
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值