我正在嘗試除錯我的 Django 專案,但是每當我在 VSCode 的運行和除錯視窗中點擊播放按鈕時,它會思考一秒鐘,然后完全停止。當我使用“runserver”命令運行它時,我的專案運行得非常好。
我試過重啟 VSCode,然后重啟我的電腦。
這是我的 launch.json 檔案
{
// 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",
"9000"
],
"django": true
}
]
}
uj5u.com熱心網友回復:
也許這有幫助:
Ctrl Shift P Python:選擇解釋器
選擇正確的
轉載請註明出處,本文鏈接:https://www.uj5u.com/shujuku/510555.html
