[Python] How to configure VS Code launch.json to debug a Streamlit app with a conda...

Discussão em 'Python' iniciado por Stack, Junho 6, 2025.

  1. Stack

    Stack Membro Participativo

    To debug a python project with a specific conda env in VS code, I normally use this launch.json

    {
    "version": "0.2.0",
    "configurations": [

    {
    "name": "Python Debugger: Current File",
    "type": "debugpy",
    "request": "launch",
    "program": "${file}",
    "console": "integratedTerminal",
    "args": [
    "--video_path","./../test_real.mp4",

    ],
    "python": "/home/<username>/miniconda3/envs/myconda_env/bin/python" // Update to the Python binary for gradtts environment
    }
    ]
    }


    Now I want to debug a streamlit app in the VS code. The command to launch a streamlit app is $ streamlit run main.py. How to modify the launch.json to achieve this task in VS code?

    Continue reading...

Compartilhe esta Página