为Virtual Studio Code配置Python调试插件(Ubuntu14.04)
Posted zhuango
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了为Virtual Studio Code配置Python调试插件(Ubuntu14.04)相关的知识,希望对你有一定的参考价值。
详情见以下python for virtual studio code插件的链接:
安装依赖
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"
]
}
以上是关于为Virtual Studio Code配置Python调试插件(Ubuntu14.04)的主要内容,如果未能解决你的问题,请参考以下文章
通过 SSH 为远程 Python 解释器配置 Visual Studio Code
可以将 Visual Studio Code 配置为使用 nodemon 启动吗
Visual Studio Code 的 launch.json 解析