Hacker Timesnew | past | comments | ask | show | jobs | submitlogin

A couple people already pointed out that you can write `breakpoint()` instead of using `pdb.set_trace()`.

Here's one more trick: you can use `pdb` to run scripts! `python -m pdb foo.py` will run `foo.py` but trigger a breakpoint on the first error.



That is definitely a neat one! If you are ok with it, I might add that one. I just updated the article already with some of the great comments and tips I recieved over here.


Oh! Thats a really nice one!




Consider applying for YC's Summer 2026 batch! Applications are open till May 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: