[英]How can I configure launch.json so it could type automatic response?
“python manage.py collectstatic”幾乎總是需要在繼續執行之前輸入“yes”或“no”( preLaunchTask(collectstatic)輸出)。 我可以讓它在 .json 文件中自動發送“是”嗎? 啟動.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
},
]
}
任務.json:
{
"version": "2.0.0",
"tasks": [
{
"label": "collectstaticcommand",
"type": "shell",
"command": "python",
"args" : [
"manage.py",
"collectstatic"
]
}
]
}
通過在 tasks.json 的 "args":[] 中添加 '--noinput' 來解決問題
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.