Comment

Comment by hwayne

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.

parent hwayne 3 years ago

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton