0
例如,我的根工作站目錄是/home/chain/Project
。我有兩個單獨的項目,分別是python
和website
。我launch.json
雲:無法在配置中使用visual studio代碼自動更改調試環境
{
"version": "0.2.0",
"configurations":
[
{
"name": "Python",
"type": "python",
"request": "launch",
"stopOnEntry": true,
"pythonPath": "${config:python.pythonPath}",
"program": "${workspaceRoot}/python_project_source/test.py",
"cwd": "${workspaceRoot}/python_project_source",
"env": {},
"envFile": "${workspaceRoot}/.env",
"debugOptions": [
"WaitOnAbnormalExit",
"WaitOnNormalExit",
"RedirectOutput"
]
},
{
"type": "chrome",
"request": "launch",
"name": "Launch Chrome against localhost",
"url": "${workspaceRoot}/website/test.html",
"webRoot": "${workspaceRoot}/website"
}
]
}
,當我選擇test.py
,按「F5」就可以切換到Python調試環境,當我選擇test.html
的Chrome瀏覽器將被打開的預期。
事實是,VS代碼只記住我上次調試的環境,而不是自動更改它。所以,我現在唯一要做的是將有一些意見,以一個環境(/* */
)當我需要編譯等。:(
有什麼事錯在我launch.json
?
真的嗎?哈哈!現在,它不能算作一個大問題,我想我會寫一個請求。謝謝! – hcnhcn012
沒問題。如果你在這裏包含鏈接,會很好。 –