IDE

JetBrains

IntelliJ: Java的IDE, 安装Python的插件也支持python.

PyCharm

PyCharm: Python的IDE.

Goland

Goland: golang的IDE.


VSCode

IntelliSense & Code Navigation

Go to Definition: F12, 跳转到定义.

Peek Definition: Alt + F12, 速览定义,不跳转.

Go to references: Shift + F12, 转到引用.

frontend

vs-js-debug

vscode内置了js/ts/node的debugger.

https://github.com/microsoft/vscode-js-debug

live server

live preview(html, svg…)

如果用remote-ssh开启live server就是在远程机器上开启5500端口,webroot就是vscode打开的目录.

如果是remote-ssh开发html,用这个preview很方便.

https://github.com/ritwickdey/vscode-live-server

vscode-chrome-debug

打开的是安装vscode的机器上的chrome。

https://github.com/microsoft/vscode-chrome-debug

通过live server监听remote-ssh机器上的5500,可以通过chrome远程调试静态站点。

{
    "version": "0.2.0",
    "configurations": [
        {
            "name": "angularjs",
            "type": "chrome",
            "request": "launch",
            "url": "http://remote-ssh-server:5500/path/to/index.html",
            "webRoot": "${workspaceFolder}/path/to/",
        },
    ]
}

python

debuging:

https://code.visualstudio.com/docs/python/debugging

debug current file:

{
    "name": "current file",
    "type": "python",
    "request": "launch",
    "program": "${file}",
    "console": "integratedTerminal",
}

debug with module:

{
    "name": "module",
    "type": "python",
    "request": "launch",
    "module": "module-name",
    "console": "integratedTerminal",
}

debug with attach:

// create ssh tunnel
ssh -2 -L sourceport:localhost:5678 -i identifyfile user@remoteaddress
{
    "name": "Python: Attach",
    "type": "python",
    "request": "attach",
    "port": 5678,
    "host": "localhost",
    "pathMappings": [
        {
            "localRoot": "${workspaceFolder}",
            "remoteRoot": ".",
        }
    ]
}

testing:

https://code.visualstudio.com/docs/python/testing

unittest:

{
    "python.testing.autoTestDiscoverOnSaveEnabled": true,
    "python.testing.unittestArgs": [
        "-v",
        "-s",
        "./tests",
        "-p",
        "test_*.py"
    ],
    "python.testing.pytestEnabled": false,
    "python.testing.nosetestsEnabled": false,
    "python.testing.unittestEnabled": true,
    "restructuredtext.confPath": "${workspaceFolder}/docs",
}

django

https://code.visualstudio.com/docs/python/tutorial-django

debugging:

{
    // 使用 IntelliSense 了解相关属性。
    // 悬停以查看现有属性的描述。
    // 欲了解更多信息,请访问: https://go.microsoft.com/fwlink/?linkid=830387
    "version": "0.2.0",
    "configurations": [
        {
            "name": "Python: Django",
            "type": "python",
            "request": "launch",
            "program": "${workspaceFolder}/path/to/manage.py",
            "console": "integratedTerminal",
            "args": [
                "runserver",
                "0:8888"
            ],
            "django": true,
            "env": {
            }
        }
    ]
}

golang

https://github.com/golang/vscode-go/blob/master/docs/debugging.md

debugging:

{
    "version": "0.2.0",
    "configurations": [
        {
            "name": "golang file",
            "type": "go",
            "request": "launch",
            "mode": "auto",
            "program": "${file}"
        },
        {
            "name": "gin debug",
            "type": "go",
            "request": "launch",
            "mode": "auto",
            "program": "${workspaceFolder}/backend/main.go"
        },
    ]
}

rest client

调试rest API

https://github.com/Huachao/vscode-restclient

example.api:

@api = http://hostname:port/api/v0
@Authorization = Basic a2FpemVuOkFybUFkbWluMSE=
@Content-Type = application/json

###
GET {{api}}/users HTTP/1.1
Authorization: {{Authorization}}
Content-Type: {{Content-Type}}

### 
POST {{api}}/groupus HTTP/1.1
Authorization: {{Authorization}}
Content-Type: {{Content-Type}}
{
    key: value
}

record

vscode录制.

https://github.com/microsoft/codetour

https://github.com/arciisine/vscode-chronicler

支持远程debug的时候在本地录制,也就是本地是windows,只需要本地安装ffmpeg和chroicler。

Designed by Canux