Raspberry Pi Pudb - A Superlite Console Based Python Based Stepping-Debugger

We show a powerful basic console based stepping debugger for the Raspberry Pi!

Raspberry Pi Pudb - A Superlite Console Based Python Based Stepping-Debugger
Linux Rocks, Rasbperry Pi Too!

Firstly ..why would anyone go back to console based apps when so many powerful applications like vscodium and pycharm exist?  Well the answer is in the fine print...  Ten years ago pycharm ran respectably on a raspberry Pi 4 with 2GB of ram, but not now, in fact the minimum to run pycharm community is:

OK -  how about vscodium?  Well it might run locally, but it chokes via a secure shell, we tried, then we tried thonny.  It failed too!  The reality was we drop money to upgrade to a raspberry pi 5 with 8GB, or we look for another option.  

.. enter pudb

If you are looking for a super-lite  stepping debugger that can run over a ssh and run fast (even on a tiny Raspberry Pi zero) - then pudb is for you!

We need to install some basics:

sudo apt install git build-essential python3

Then make yourself a virtual environment:

python3 -m venv venv
cd venv/bin
source activate
(venv) c@raspberrylog:~/ptest/venv/bin $

Your (venv) will show that you have now activated your virtual environment, then as packages are installed they will be part of that virtual environment.

cd ~/ptest
git clone https://github.com/inducer/pudb
pip3 install -r pudb/requirements.dev.txt
pip3 install typing_extensions
pip3 install pudb

Then run the exanple:

./try-the-debugger.sh

Once it is installed it can be activated against any python program with simply

python -m pudb <pythonprogram.py>

Using the 'b' button as we move up and down in the text we can set various breakpoints:

The options available are:

This is powerful. Stepping debuggers are the defacto tools to get things done, without them you are relegated to simple print and break statements, this is a giant time saver!

Linux Rocks Every Day