Notes
VSCode配置Python Django开发环境(Windows10)
参考:
创建venv
vscode切换python的interpreter
执行命令, python select interpreter
,切换到刚才创建的venv
配置调试器
其实现在的vscode已经相当只能了,在不配置launch.json
的情况下也能用预置的设置进行调试,但是这样稍微有点不方便,
点击Run Debug
(或者Ctrl+shift+D)启动调试器,创建launch.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
|
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"name": "Python: Django",
"type": "python",
"request": "launch",
"program": "${workspaceFolder}\\manage.py",
"args": [
"runserver"
],
"env": {
"PYTHONUNBUFFERED": "1",
"DJANGO_SETTINGS_MODULE": "rinpoche_ask_api.settings"
},
"django": true,
"python": "${command:python.interpreterPath}"
}
]
}
|