ubuntu常用软件安装

  • 安装scode

首先去官网下载.deb的安装包
进入安装目录
sudo apt install ./<file>.deb

# If you're on an older Linux distribution, you will need to run this instead:
# sudo dpkg -i <file>.deb
# sudo apt-get install -f # Install dependencies

在插件中下载

Atom One Dark Theme
Bracket Pair Colorizer
C/C++
C++ Intellisense
Chinese (Simplified) Language Pack for Visual Studio Code
Code Runner

 在debug中点击添加匹配,选择C++,修改默认的launch.json

{
    // 使用 IntelliSense 了解相关属性。 
    // 悬停以查看现有属性的描述。
    // 欲了解更多信息,请访问: https://go.microsoft.com/fwlink/?linkid=830387
    "version": "0.2.0",
    "configurations": [
        {
            "name": "(gdb) 启动",//配置名称,将会在启动配置的下拉菜单中显示
            "type": "cppdbg",//配置类型,cppdbg对应cpptools提供
            "request": "launch",
            "program": "${workspaceFolder}/a.out",
            "args": [],
            "stopAtEntry": false,
            "cwd": "${workspaceFolder}",
            "environment": [],
            "externalConsole": true,
            "MIMode": "gdb",
       "preLaunchTask": "build",
"setupCommands": [ { "description": "为 gdb 启用整齐打印", "text": "-enable-pretty-printing", "ignoreFailures": true } ] } ] }

 

按ctrl+shift+p打开命令行输入task,选择Tasks:run task

选择create task.json file from template

选择Others

修改默认的task.json

{
    // See https://go.microsoft.com/fwlink/?LinkId=733558
    // for the documentation about the tasks.json format
    "version": "2.0.0",
    "tasks": [
        {
            "label": "build",
            "type": "shell",
            "command": "g++",
            "args": ["-g", "${file}", "-std=c++11", "-o", "${fileBasenameNoExtension}.out"]
        }
    ]
}

 参考连接

posted @ 2020-06-11 21:54  似剑非攻  阅读(213)  评论(0编辑  收藏  举报