Debugging Python with pudb

1. Install pudb pip package..

 $ pip install pudb

2. Add the following statement in python code.
import pudb; pudb.set_trace()
3. Or, Launch the debugger like below
$ python -m pudb my_script.py

No comments:

Post a Comment

Detectron2 + PyTorch CPU : Fix Install issue

Detectron2 + PyTorch CPU ❌ The error $ pip install -q --extra-index-url https://download.pytorch.org/whl/cpu torch torchvision $ pip inst...