Debugging Streamlit with PyCharm

Photo by path digital on Unsplash

Streamlit is a Python package that allows you to build beautiful dashboards from Python without the need for a deep knowledge of front-end development. This is my case. I have never been interested that much in front-end development. I was, and I am a backend developer type.
Since I am playing with different data coming from our systems, I found Streamlit incredibly useful for organizing and visualizing the data I collect. You can run your dashboard locally and deploy it in the cloud when you need to share it with others in your organization.
I love PyCharm, which I use for my Python development.
As for every application, you need some debugging to ensure you are doing the right thing.
When you develop locally, you run a local Streamlit, dedicated web server. How can you debug my script in PyCharm?
I spent some time thinking about it and found a solution that may be helpful to other people out there. This will work in Visual Studio Code as well, but I didn’t try it since I don’t love Visual Studio Code so much.
You can add a Run/Debug configuration to PyCharm like the one you see below:

PyCharm – Add Run/Debug Configuration

Now you can set your breakpoints in the script and debug it as you usually do in PyCharm.

0 0 votes
Article Rating
Subscribe
Notify of
guest


0 Commenti
Newest
Oldest Most Voted
Inline Feedbacks
View all comments

Alessandro Galetto

Fuga da Whatsapp

Alessandro Galetto         Alessandro Galetto        
Fuga da Whatsapp           Fuga da Whatsapp          
More
Speed: 50% Speed: 75% Speed: Normal Speed: 125% Speed: 150% Speed: 175% Speed: Double Speed: Triple
Back 15 seconds
Forward 60 seconds
More
more
    Speed: 50% Speed: 75% Speed: Normal Speed: 125% Speed: 150% Speed: 175% Speed: Double Speed: Triple
    Back 15 seconds
    Forward 60 seconds
    Currently Playing
    0
    Would love your thoughts, please comment.x
    ()
    x