'How can I configure launch.json so it could type automatic response?
'python manage.py collectstatic' almost always requires typing 'yes' or 'no'(preLaunchTask(collecstatic) output), before continuing to execute. Can I make it send 'yes' automatically in .json file? launch.json
{
"version": "0.2.0",
"configurations": [
{
"preLaunchTask" : "collectstaticcommand",
"name": "Python: Django",
"type": "python",
"request": "launch",
"program": "${workspaceFolder}\\manage.py",
"args": [
"runserver"
],
"django": true,
"justMyCode": false
},
]
}
tasks.json:
{
"version": "2.0.0",
"tasks": [
{
"label": "collectstaticcommand",
"type": "shell",
"command": "python",
"args" : [
"manage.py",
"collectstatic"
]
}
]
}
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|