真知即所以为行,不行不足谓之知。

my vscode settings for python

Spread the love

lunch.json

{

// 使用 IntelliSense 了解相关属性。

// 悬停以查看现有属性的描述。

// 欲了解更多信息,请访问: https://go.microsoft.com/fwlink/?linkid=830387

"version": "0.2.0",

"configurations": [

{

"name": "Python:Debug console",

"type": "python",

"request": "launch",

"stopOnEntry": false,//是否在第一条语句时程序停止,下面的这个选项都一样

"pythonPath": "E:\\ProgramData\\Anaconda3\\python.exe",//可执行文件路径

"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": false,

"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": false,

"pythonPath": "${config:python.pythonPath}",

"program": "${file}",

"cwd": "",

"console": "externalTerminal",

"env": {},

"envFile": "${workspaceRoot}/.env",

"debugOptions": [

"WaitOnAbnormalExit",

"WaitOnNormalExit"

]

},

{

"name": "External Terminal/Console",

"type": "python",

"request": "launch",

"stopOnEntry": false,

"pythonPath": "${config:python.pythonPath}",

"program": "${file}",

"cwd": "",

"console": "externalTerminal",

"env": {},

"envFile": "${workspaceRoot}/.env",

"debugOptions": [

"WaitOnAbnormalExit",

"WaitOnNormalExit"

]

},

{

"name": "Django",

"type": "python",

"request": "launch",

"stopOnEntry": false,

"pythonPath": "${config:python.pythonPath}",

"program": "${workspaceRoot}/manage.py",

"cwd": "${workspaceRoot}",

"args": [

"runserver",

"--noreload",

"--nothreading"

],

"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"

}

]

}



settings.json
{

"python.pythonPath": "e:\\ProgramData\\Anaconda3\\python.exe",

"python.linting.enabled": false

}
tasks.json
{

// See https://go.microsoft.com/fwlink/?LinkId=733558

// for the documentation about the tasks.json format

"version": "2.0.0",

"tasks": [

{

"taskName": "echo",

"type": "shell",

"command": "e:\\ProgramData\\Anaconda3\\python.exe",//Python可执行文件路径

"args": ["${file}"]

}

]

}

Spread the love
 收藏 (0) 打赏

您可以选择一种方式赞助本站

支付宝扫一扫赞助

微信钱包扫描赞助

未经允许不得转载:Living in the flow » my vscode settings for python

分享到: 更多 (0)
avatar

评论 抢沙发

  • QQ号
  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址
切换注册

登录

忘记密码 ?

切换登录

注册

我们将发送一封验证邮件至你的邮箱, 请正确填写以完成账号注册和激活