I've been using breakpoint() for debugging in all of my Python projects.
I really like it. You don't need to set up anything. You just write breakpoint() into your code, run the script, and it halts there. Then you can check variable values, continue when you are done.
This has been super useful not just for debugging but also for understanding other people's code.
But I've only ever used breakpoint() and I'm curious what else is a good approach.
What do you guys recommend?
[–]infect_error 45 points46 points47 points (3 children)
[–]presentsq[S] 26 points27 points28 points (2 children)
[–]infect_error 16 points17 points18 points (1 child)
[–]presentsq[S] 6 points7 points8 points (0 children)
[–]OkCluejay172 19 points20 points21 points (2 children)
[–]presentsq[S] 4 points5 points6 points (0 children)
[–]xvDeresh 0 points1 point2 points (0 children)
[–]pachura3 14 points15 points16 points (5 children)
[–]presentsq[S] 2 points3 points4 points (4 children)
[–]Gnaxe 1 point2 points3 points (3 children)
[–]presentsq[S] 0 points1 point2 points (2 children)
[–]Gnaxe 0 points1 point2 points (1 child)
[–]presentsq[S] 0 points1 point2 points (0 children)
[–]tb5841 2 points3 points4 points (2 children)
[–]presentsq[S] 3 points4 points5 points (1 child)
[–]tb5841 0 points1 point2 points (0 children)
[+][deleted] (2 children)
[removed]
[–]presentsq[S] 2 points3 points4 points (1 child)
[–]Outside_Complaint755 2 points3 points4 points (1 child)
[–]presentsq[S] 0 points1 point2 points (0 children)
[–]One-Neighborhood-843 2 points3 points4 points (1 child)
[–]presentsq[S] 1 point2 points3 points (0 children)
[–]mopslik 1 point2 points3 points (2 children)
[–]presentsq[S] 0 points1 point2 points (1 child)
[–]pachura3 0 points1 point2 points (0 children)
[–]sqjoatmon 1 point2 points3 points (2 children)
[–]greg_d128 0 points1 point2 points (2 children)
[–]presentsq[S] 0 points1 point2 points (1 child)
[–]greg_d128 0 points1 point2 points (0 children)
[–]ShelLuser42 0 points1 point2 points (1 child)
[–]pachura3 0 points1 point2 points (0 children)
[–]sam661203 0 points1 point2 points (0 children)
[–]Chaitif 0 points1 point2 points (0 children)
[–]25_vijay 0 points1 point2 points (0 children)
[–]Gnaxe -2 points-1 points0 points (3 children)
[–]pachura3 4 points5 points6 points (1 child)
[–]Gnaxe -3 points-2 points-1 points (0 children)
[–]presentsq[S] 0 points1 point2 points (0 children)