0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

Python Webフレームワーク launch.jsonまとめ

0
Last updated at Posted at 2022-12-06

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"
    }
}
0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?