streamlit/streamlit#648 (comment)
Hey @andaag -
I don't think we've tested Streamlit with
ptvsd
, so I can't comment on that particular plugin. (The awesome-streamlit project is created by an (awesome!) Streamlit community member, so the doc you're following doesn't come from us.)I use PyCharm for all my Python debugging, so I'm not a VScode expert, but I was able to get a Streamlit debugging session working without any third-party plugins.
I edited my project's
launch.json
file (see here for more details on creating that file), and added a new launch configuration:{ "name": "Streamlit: Current File (Integrated Terminal)", "type": "python", "request": "launch", "program": "/Users/tim/.local/share/virtualenvs/lib-CDRh8goq/bin/streamlit", "args": [ "run", "${file}" ], "console": "integratedTerminal" },The "program" argument here is the path to
bin/streamlit
within my local virtual environment, so you'll need to replace it with the correct path for your setup.The "args" values here are just telling VScode to run
streamlit run ${file}
, where${file}
gets replaced with the currently active VScode file.