Skip to main content

Python debug configuration generator for vscode

Project description

vpdbz

为vscode生成Python调试配置生成器

安装

pip install vpdbz

命令行工具

使用Python命令行生成VSCode调试配置。

只需在Python命令前加上vpdbz,它就能自动生成VSCode的调试配置文件。它会正确解析环境变量和参数列表。

例如:

vpdbz CUDA_VISIBLE_DEVICES=1,2 python train.py --batch-size 16 --lr 1e-4

它会在.vscode/launch.json中生成调试配置。然后你可以通过点击相应的按钮来调试你的Python文件。

{
    "version": "0.2.0",
    "configurations": [
        {
            "name": "Python: python train.py --batch-size 16 --lr 1e-4",
            "type": "python",
            "request": "launch",
            "program": "train.py",
            "env": {
                "CUDA_VISIBLE_DEVICES": "1,2"
            },
            "console": "integratedTerminal",
            "args": [
                "--batch-size",
                "16",
                "--lr",
                "1e-4"
            ],
            "cwd": "/home/xxx/demo_project",
            "justMyCode": false,
            "variablePresentation": {
                "all": "hide",
                "protected": "inline"
        }
        }
    ]
}

注意:vpdbz命令必须在vscode项目的根文件夹中执行。

更新日志

2024.07.17

  1. 为vpdbz自动安装依赖项。
  2. 处理环境变量。
  3. 隐藏特殊变量和函数变量。
  4. 调试所有Python文件。

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

vpdbz-0.5.0.tar.gz (2.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

vpdbz-0.5.0-py3-none-any.whl (3.2 kB view details)

Uploaded Python 3

File details

Details for the file vpdbz-0.5.0.tar.gz.

File metadata

  • Download URL: vpdbz-0.5.0.tar.gz
  • Upload date:
  • Size: 2.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.3 CPython/3.8.10 Linux/5.4.0-186-generic

File hashes

Hashes for vpdbz-0.5.0.tar.gz
Algorithm Hash digest
SHA256 192d8bd7580ea406083b89f6463c55b9c9cd3578ab55f11611086b2a82ebdd34
MD5 a8250f8962d03ed50d5eb3784e0a07af
BLAKE2b-256 4c8cfbba8efc1daea055d2364300fac8aac95f0caa3eb3716c1ad4de0691dff5

See more details on using hashes here.

File details

Details for the file vpdbz-0.5.0-py3-none-any.whl.

File metadata

  • Download URL: vpdbz-0.5.0-py3-none-any.whl
  • Upload date:
  • Size: 3.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.3 CPython/3.8.10 Linux/5.4.0-186-generic

File hashes

Hashes for vpdbz-0.5.0-py3-none-any.whl
Algorithm Hash digest
SHA256 a6f689d47ef7ddfe00e5d90b52e0e01cb628f09f121be6b5909687aee3dda792
MD5 9a51c6f3e211866cd24767a2c5e19e2e
BLAKE2b-256 dc390f735aa12b7153d1973afa4466f4387cdd256ee7f8738a15a091cee2ba9d

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page