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?

Visual Studio Code(VSCode)におけるlaunch.json内のPythonPathの書き方

Last updated at Posted at 2025-06-30
  • PATH区切りの違いに注意

    • Windows→;
    • Linux, macOSは:
  • .vscode/lanunch.jsonにおけるPYTHONPATHの書き方例

.vscode/lanunch.json
{
    // IntelliSense を使用して利用可能な属性を学べます。
    // 既存の属性の説明をホバーして表示します。
    // 詳細情報は次を確認してください: https://go.microsoft.com/fwlink/?linkid=830387
    "version": "0.2.0",
    "configurations": [

        {
            "name": "[Windows用] Python デバッガー: 現在のファイル",
            "type": "debugpy",
            "request": "launch",
            "program": "${file}",
            "console": "integratedTerminal"
            "env":{
                "PYTHONPATH": "${workspaceFolder};${env:PYTHONPATH}"
            }
        },
        {
            "name": "[Linux, macOS用(非Windows(POSIX全般OK?))] Python デバッガー: 現在のファイル",
            "type": "debugpy",
            "request": "launch",
            "program": "${file}",
            "console": "integratedTerminal"
            "env":{
                "PYTHONPATH": "${workspaceFolder}:${env:PYTHONPATH}"
            }
        }
    ]
}
0
0
1

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?