Monday, September 22, 2025

Visual Studio Code: A launch.json for Python Development

Having spent years as a PowerShell developer, I find myself in need of a launch.json file for Python work. To add the launch.json file, create a new file under .vscode in Visual Studio Code. An example launch.json is as follows:

{
  "version": "0.2.0",
  "configurations": [
    {
      "name": "Python: Upload CVEs",
      "type": "debugpy",
      "request": "launch",
      "program": "${workspaceFolder}/upload_cve_docs.py",
      "console": "integratedTerminal",
      "args": [
        "--file", "cve.jsonl",
        "--format", "jsonl",
        "--merge"
      ]
    }
  ]
}

The above launch.json file is specific to a script I am debugging (upload_cve_docs.py) and the parameters associated with that script.

The type attribute should be set as follows:
      "type": "debugpy",

Older version of launch.json specified:

      "type": python",

Using the above type attribute will display the following message as the attribute value python has been deprecated: 


No comments :

Post a Comment