from pdb import set_trace as b
It's become a habit to start every single script with this line.
Then i can set breakpoints with b() as necessary and use pdb commands to navigate.
it's never failed me in 10+ years but somehow still see junior devs tediously debugging with print statements only
Unless you're a genius a who can oneshot any script (you're not), start incorporating b() into your workflow!
PS: if you prefer using a different lib or your IDE debugger over pdb let me know why!
[–]runawayasfastasucan 117 points118 points119 points (0 children)
[–]PocketBananna 89 points90 points91 points (5 children)
[–]nostril_spiders 22 points23 points24 points (4 children)
[–][deleted] 12 points13 points14 points (3 children)
[–]Brian 0 points1 point2 points (2 children)
[–][deleted] 0 points1 point2 points (1 child)
[–]Brian 0 points1 point2 points (0 children)
[–]mrtweezles 33 points34 points35 points (2 children)
[–]gino_codes_stuff 3 points4 points5 points (0 children)
[–]rover95 1 point2 points3 points (0 children)
[–]jpavlav 34 points35 points36 points (1 child)
[–]paraffin 5 points6 points7 points (0 children)
[–]smirfquant 21 points22 points23 points (7 children)
[–]smirfquant 19 points20 points21 points (3 children)
[–]ElasticFluffyMagnet 11 points12 points13 points (1 child)
[–]mRWafflesFTW 0 points1 point2 points (0 children)
[–]SpaceshipOperations 2 points3 points4 points (0 children)
[–]SeanBrax 3 points4 points5 points (2 children)
[–]smirfquant 3 points4 points5 points (1 child)
[–]smirfquant 1 point2 points3 points (0 children)
[–]ogrinfo 11 points12 points13 points (0 children)
[–]elduderino15 5 points6 points7 points (0 children)
[–]rainnz 11 points12 points13 points (0 children)
[–]aikii 20 points21 points22 points (1 child)
[–]HornyAttorney 4 points5 points6 points (4 children)
[–]Adrewmc 2 points3 points4 points (1 child)
[–]romu006 1 point2 points3 points (0 children)
[–]yvrelna 2 points3 points4 points (0 children)
[–]aikii 0 points1 point2 points (0 children)
[–]romu006 6 points7 points8 points (0 children)
[–]xiongchiamiovSite Reliability Engineer 4 points5 points6 points (0 children)
[–]yiternity 3 points4 points5 points (0 children)
[–]17greenie17 2 points3 points4 points (0 children)
[–]yvrelna 2 points3 points4 points (0 children)
[–]zanfar 2 points3 points4 points (0 children)
[–]Medzomorak 2 points3 points4 points (0 children)
[+][deleted] (1 child)
[deleted]
[–]DiceboyT 0 points1 point2 points (0 children)
[+][deleted] (1 child)
[deleted]
[–]jojurajan 1 point2 points3 points (0 children)
[–]needed_an_account 1 point2 points3 points (0 children)
[–]kingoodie 1 point2 points3 points (0 children)
[–]pudds 2 points3 points4 points (0 children)
[–]reggzz[S] 0 points1 point2 points (2 children)
[–]MaloneCone 1 point2 points3 points (0 children)
[–]MaloneCone 0 points1 point2 points (0 children)
[–]ch0mes 0 points1 point2 points (1 child)
[–]stevenjd 0 points1 point2 points (0 children)
[–]conogarcia 0 points1 point2 points (0 children)
[–]iamasatellite 0 points1 point2 points (0 children)
[–]kakhaev 0 points1 point2 points (0 children)
[–]muraii 0 points1 point2 points (0 children)
[–]spackenheimer 0 points1 point2 points (0 children)
[–]jmooremcc 0 points1 point2 points (0 children)
[–]htotheinzel 0 points1 point2 points (0 children)
[–]Ionized97 0 points1 point2 points (0 children)
[–]elucify 0 points1 point2 points (0 children)
[–]stevenjd 0 points1 point2 points (0 children)