I’ve read through the docs and this forum but I can’t quite figure out how to drop into a pdb session (or similar) for debugging my streamlit app.
So far I’ve just been writing out variables with
st.write as a form of print line debugging.
Hi @Chandler. It’s as simple as writing a line of
This did not work for me, I get an exception in the streamlit UI
You can use
breakpoint() in python 3.7+. Prior to that the command is
I’ve started writing a tutorial on using VS Code with Streamlit at https://awesome-streamlit.readthedocs.io/en/latest/vscode.html
There you can see more about debugging including using the integrated debugger.
Hope it works for you.
Keywords: VS Code, Integrated Debugger, Keyboard Shortcut.