详情见以下python for virtual studio code插件的链接:

python

安装依赖

1、Python is installed on the current system

  Path to python can be configured

2、Pylint is installed for linting (optional)

  sudo apt-get install pylint

3、Pep8 is installed for linting (optional)

  sudo apt-get  install pep8

4、Flake8 is installed for linting (optional)

  sudo apt-get  install flake8

5、Autopep8 is installed for code formatting (optional)

  sudo apt-get  install pep8

  sudo apt-get  install --upgrade autopep8

6、Yapf is installed for code formatting (optional)

  sudo apt-get  install yapf

7、nosetests for unit testing (optional)

  sudo apt-get  install nose

安装不了的去github找源码安装,一般用python setup.py install即可。

安装python for VSCode

打开VSCode界面,Ctrl+p并输入ext install python,即会显示符合条件的插件,点击安装即可。

配置Debug

{
"name": "Python",
"type": "python",
"request": "launch",
"stopOnEntry": true,
"externalConsole":false,
"program": "${file}",
"debugOptions": [
"WaitOnAbnormalExit",
"WaitOnNormalExit",
"RedirectOutput"
]
}
05-11 21:49
查看更多