Skip to content

Instantly share code, notes, and snippets.

@senina4
Last active January 4, 2024 02:03
Show Gist options
  • Save senina4/1920c25f4fd55dfca7ee85375e672088 to your computer and use it in GitHub Desktop.
Save senina4/1920c25f4fd55dfca7ee85375e672088 to your computer and use it in GitHub Desktop.
Python VSCode Launch Config

Python launch config

vscode launch.json

{
   // Use IntelliSense to find out which attributes exist for C# debugging
   // Use hover for the description of the existing attributes
   // For further information visit https://github.com/OmniSharp/omnishar...
   "version": "0.2.0",
   "configurations": [
       {
           "name": "Python: Current Dir (external)",
           "type": "python",
           "request": "launch",
           "cwd":"${fileDirname}",
           "program": "${file}",
           "console": "externalTerminal",
           "env": {"PYTHONPATH": "${workspaceRoot}"},
       },
       {
           "name": "Python: Current Dir (internal)",
           "type": "python",
           "request": "launch",
           "cwd":"${fileDirname}",
           "program": "${file}",
           "console": "integratedTerminal",
           "env": {"PYTHONPATH": "${workspaceRoot}"},
        },
       {
            "name": "Python: Current File (Integrated Terminal)",
            "type": "python",
            "request": "launch",
            "program": "${file}",
            "console": "integratedTerminal",
       }
   ]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment