vscode debug django test
2020-04-24 本文已影响0人
swotpp
配置文件 launch.json 更改一下就可以了,只是没有 pycharm 可以自己设置要 test 的类或者方法方便
{
// 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 test",
"type": "python",
"request": "launch",
"program": "${workspaceFolder}/manage.py",
"args": [
"test",
"--noreload",
"call.tests.HelloTests"
],
"django": true,
"justMyCode": false
},
{
"name": "Python: Django",
"type": "python",
"request": "launch",
"program": "${workspaceFolder}/manage.py",
"args": [
"runserver",
"--noreload"
],
"django": true,
"justMyCode": false
}
]