How to use Streamlit with VS Code?

The following launch configuration works to invoke the integrated debugger of vscode:
{
“name”: “Python: Streamlit”,
“type”: “python”,
“request”: “launch”,
“module”: “streamlit.cli”,
“args”: [
“run”,
“${file}”,
],
}

To add or invoke a launch configuration in vscode, use Ctrl+Shift+P, choose “Debug: Select and Start Debugging”, and edit launch.json with the snippet above.

Inspired from here, I did not yet see this approach in the tutorial.

6 Likes