3 ms·
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 scrip
by hwayne 3y ago
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.
- tomtom1337 3y agoOh! Thats a really nice one!
- erikvdven 3y agoThat 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.