VSCodeのデバッグでlaunch.jsonの設定に毎回悩むのでPythonのWebフレームワークの設定方法を残します。
Django, Django Rest Framework
{
"version": "0.2.0",
"configurations": [
{
"name": "Django debugger",
"type": "python",
"request": "launch",
"program": "${workspaceFolder}/manage.py",
"args": [
"runserver",
"8000" // 適当にポート変える
],
"django": true
}
]
}
FastAPI
// /appというディレクトリにFastAPIのアプリケーションが格納されている前提
{
"type": "python",
"request": "attach",
"name": "FastAPI",
"port": 8000, // 適当にポート変える
"host": "localhost",
"pathMapping": {
"localRoot": "${workspacFolder}",
"remoteRoot": "/app"
}
}