mac 下vscode配置python
- command + shift + P 输入task
- 打开第一个配置文件tasks.json
-
{ "version": "0.1.0", "command": "python", "isShellCommand": true, "args": ["${file}"], "showOutput": "always" }
- 新建一个test.py
- command + shift + B运行py文件
-
- 配置python debug
- 1、新建一个python项目
- 2、打开launch.json文件
- 3、修改lanuch.json文件为:
-
{ "version": "0.2.0", "configurations": [ { "name": "Python", "type": "python", "request": "launch", "stopOnEntry": true, "pythonPath": "${config:python.pythonPath}", "program": "${file}", "cwd": "${workspaceRoot}", "env": {}, "envFile": "${workspaceRoot}/.env", "debugOptions": [ "WaitOnAbnormalExit", "WaitOnNormalExit", "RedirectOutput" ] }, { "name": "PySpark", "type": "python", "request": "launch", "stopOnEntry": true, "osx": { "pythonPath": "${env:SPARK_HOME}/bin/spark-submit" }, "windows": { "pythonPath": "${env:SPARK_HOME}/bin/spark-submit.cmd" }, "linux": { "pythonPath": "${env:SPARK_HOME}/bin/spark-submit" }, "program": "${file}", "cwd": "${workspaceRoot}", "env": {}, "envFile": "${workspaceRoot}/.env", "debugOptions": [ "WaitOnAbnormalExit", "WaitOnNormalExit", "RedirectOutput" ] }, { "name": "Python Module", "type": "python", "request": "launch", "stopOnEntry": true, "pythonPath": "${config:python.pythonPath}", "module": "module.name", "cwd": "${workspaceRoot}", "env": {}, "envFile": "${workspaceRoot}/.env", "debugOptions": [ "WaitOnAbnormalExit", "WaitOnNormalExit", "RedirectOutput" ] }, { "name": "Integrated Terminal/Console", "type": "python", "request": "launch", "stopOnEntry": true, "pythonPath": "${config:python.pythonPath}", "program": "${file}", "cwd": "", "console": "integratedTerminal", "env": {}, "envFile": "${workspaceRoot}/.env", "debugOptions": [ "WaitOnAbnormalExit", "WaitOnNormalExit" ] }, { "name": "External Terminal/Console", "type": "python", "request": "launch", "stopOnEntry": true, "pythonPath": "${config:python.pythonPath}", "program": "${file}", "cwd": "", "console": "externalTerminal", "env": {}, "envFile": "${workspaceRoot}/.env", "debugOptions": [ "WaitOnAbnormalExit", "WaitOnNormalExit" ] }, { "name": "Django", "type": "python", "request": "launch", "stopOnEntry": true, "pythonPath": "${config:python.pythonPath}", "program": "${workspaceRoot}/manage.py", "cwd": "${workspaceRoot}", "args": [ "runserver", "--noreload" ], "env": {}, "envFile": "${workspaceRoot}/.env", "debugOptions": [ "WaitOnAbnormalExit", "WaitOnNormalExit", "RedirectOutput", "DjangoDebugging" ] }, { "name": "Flask", "type": "python", "request": "launch", "stopOnEntry": false, "pythonPath": "${config:python.pythonPath}", "program": "fully qualified path fo 'flask' executable. Generally located along with python interpreter", "cwd": "${workspaceRoot}", "env": { "FLASK_APP": "${workspaceRoot}/quickstart/app.py" }, "args": [ "run", "--no-debugger", "--no-reload" ], "envFile": "${workspaceRoot}/.env", "debugOptions": [ "WaitOnAbnormalExit", "WaitOnNormalExit", "RedirectOutput" ] }, { "name": "Flask (old)", "type": "python", "request": "launch", "stopOnEntry": false, "pythonPath": "${config:python.pythonPath}", "program": "${workspaceRoot}/run.py", "cwd": "${workspaceRoot}", "args": [], "env": {}, "envFile": "${workspaceRoot}/.env", "debugOptions": [ "WaitOnAbnormalExit", "WaitOnNormalExit", "RedirectOutput" ] }, { "name": "Pyramid", "type": "python", "request": "launch", "stopOnEntry": true, "pythonPath": "${config:python.pythonPath}", "cwd": "${workspaceRoot}", "env": {}, "envFile": "${workspaceRoot}/.env", "args": [ "${workspaceRoot}/development.ini" ], "debugOptions": [ "WaitOnAbnormalExit", "WaitOnNormalExit", "RedirectOutput", "Pyramid" ] }, { "name": "Watson", "type": "python", "request": "launch", "stopOnEntry": true, "pythonPath": "${config:python.pythonPath}", "program": "${workspaceRoot}/console.py", "cwd": "${workspaceRoot}", "args": [ "dev", "runserver", "--noreload=True" ], "env": {}, "envFile": "${workspaceRoot}/.env", "debugOptions": [ "WaitOnAbnormalExit", "WaitOnNormalExit", "RedirectOutput" ] }, { "name": "Attach (Remote Debug)", "type": "python", "request": "attach", "localRoot": "${workspaceRoot}", "remoteRoot": "${workspaceRoot}", "port": 3000, "secret": "my_secret", "host": "localhost" } ] }
- 4、debug窗口就会出现python debug 字样,就可以直接debug了;
-
完毕!
相关推荐
Notes and code used in my [**Python and OpenCV course**](https://youtube/oXlwWbU8l2o) on [freeCodeCamp.org](http://freecodecamp.org). You can find me on [Twitter](https://twitter.com/jasmcaus) for ...
使用vscode调试c程序和Python
MS Python插件。 这是微软官方的Python插件,已经自带很多功能。下面是插件功能描述,其中部分内容我做了翻译。 a) Linting (Prospector, Pylint, pycodestyle, Flake8, pylama, pydocstyle, mypy with ...
准备工作 ...查看Visual Studio Code Tips and Tricks,快速熟悉VSCode。 用户界面 了解VSCode用户界面,如下图所示,随便点一点,还是比较一目了然的。 快捷键 Windows下的默认快捷键如下图所示,万能C
It comes with built-in support for JavaScript, TypeScript and Node.js and has a rich ecosystem of extensions for other languages (such as C++, C#, Java, Python, PHP, Go) and runtimes (such as .NET ...
使用Python和Django构建Restuarnt网站 从这里获取课程: : ... 我将向您展示如何免费下载和安装所需的所有内容(Django,Python和VSCode)。 除此之外,您只需要一台具有Internet访问权限的计算机即可! 我需要知道
It comes with built-in support for JavaScript, TypeScript and Node.js and has a rich ecosystem of extensions for other languages (such as C++, C#, Java, Python, PHP, Go) and runtimes (such as .NET ...
这里使用的操作系统为win7/10,安装环境是使用Anconda搭建Python环境,然后在Vscode编辑器中安装Python插件,最终能够在Vscode环境下使用Python。 一、Anconda软件的安装 Anaconda is a completely free Python ...
打开软件vscode,按下快捷键Ctrl+X,P,在界面左边会有GIT、VSCODE和FAVORITES 三部分,在GIT部分会看到自己参与的github上面的所有项目,用哪个项目点击哪个项目 就可以,这样就可以随意切换项目,不用麻烦从文件夹...
houdini的内置编辑器中的vex或python的代码推送到vscode上。自动配置的语法高亮和自动补全。 安装方法: Go to you $HOME/Houdini16.0 folder ( for instance, on windows: C:\Users\%USERNAME%\Documents\...
:hammer_and_wrench:安装 :package:发行版 需要提前安装上FFmpeg 已为Windows 64位打包成可直接双击运行的包,请到。下载界面将。7z压缩包解压后,文件夹内有一个exe文件,双击即可运行。 也可以从命令行运行: 我...
文章目录1、简介2、VsCode下载安装2.1、下载安装2.2、安装中文语言包2.2.1、快捷键找到语言配置2.2.2、安装中文语言包2.2.3、重启IDE2.2.4、安装语言包成功啦2.3、安装Go的插件2.4、增加Go的配置文件2.4.1、快捷键...
这是一个VSCode的方便用户创建创建文件的扩展这个扩展旨在使VSCode可以像IDE一样创建各种类型的文件,并根据用户填写的内容配合模板生成初始化代码和注释。特性在工作区的任意位置创建各种类型项目的文件(如Java、...
It comes with built-in support for JavaScript, TypeScript and Node.js and has a rich ecosystem of extensions for other languages and runtimes (such as C++, C#, Java, Python, PHP, Go, .NET)....
用chatterbot + tkinter制作的交互式聊天机器人! 安装 ...# if you have vscode, open bartholomeusAI and press " ctrl+click " in time.clock () path after the error message appears 请享用!
将houdini的内置编辑器中的vex或python的代码推送到vscode上。自动配置的语法高亮和自动补全。 (Houdini Expression Editor allows you to set up an external text editor for all type of expressions. Such as ...
最近要对一系列数据做同比比较,需要用到numpy和pandas来计算,不过使用python安装numpy和pandas因为linux环境没有外网遇到了很多问题就记下来了。首要条件,python版本必须是2.7以上。 linux首先安装依赖包 yum -y...
It comes with built-in support for JavaScript, TypeScript and Node.js and has a rich ecosystem of extensions for other languages (such as C++, C#, Java, Python, PHP, Go) and runtimes (such as .NET ...
OutVirus-信息通报 Python的专业检测病毒。 普鲁埃巴生产和销售产品。 Windows单独安装Windows 7 产品版本:2.01 法兰西(Fecha de lanzamiento):14/03/2021 ... 在Pycharm和VSCode中进行Python 3编程的人员。
Django的 Django추천버전 Django설치 pip install Django==3.2 # OR pipenv install django Django확인 ...# Editor directories and files .idea .vscode * .suo * .ntvs * * .njsproj * .sln * .sw *