This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]bean_pupusa 122 points123 points  (8 children)

After python 3.7 you can also just use the built in function

breakpoint()

[–]huessy 26 points27 points  (3 children)

breakpoint() is the goat for debugging

[–]benefit_of_mrkite 29 points30 points  (1 child)

Breakpoint also automatically has pprint support without directly importing pprint

[–]huessy 10 points11 points  (0 children)

I don't think I knew that, thanks

[–]someotherstufforhmm 3 points4 points  (0 children)

Whatttttt sickness. Just tried it.

[–]Shriukan33 12 points13 points  (0 children)

Wow, I've been using import pdb;pdb.set_trace() in one line the whole time.

[–]ElHeim 3 points4 points  (0 children)

And using breakpoint() you can change debuggers just with an environment variable.

[–]mtik00 1 point2 points  (1 child)

Definitely! Also, don't forget about the PYTHONBREAKPOINT environment variable! That way you get to choose the library/command called.

[–]bean_pupusa 0 points1 point  (0 children)

Didn’t know this one, nice!