postmortem debugging in python (beginner - intermediate) anthony explains

  Рет қаралды 4,020

anthonywritescode

anthonywritescode

Күн бұрын

Пікірлер
@sparkyb6
@sparkyb6 3 жыл бұрын
I do post mortem debugging a bunch, but I learned something new regarding using python -m pdb and also using pdb.post_mortem() from the except block. For the later I'd usually do a breakpoint() in the except block, but of course that doesn't actually get me where I really want to be, so I end up having to move except blocks up to find a better place to put that, so pdb.post_mortem() sounds great. For the former case where the exception would bubble all the way up, what I've always done is run python -i t.py, then when the exception is raised I'll get dropped into an interactive python console. From there I can do import pdb; pdb.pm(). pdb.pm() is basically like pdb.post_mortem() except instead of debugging the current exception, it debugs the last exception.
@ankushm3t
@ankushm3t Жыл бұрын
If you use ipython, postmortem debugger can be automatically called on exception using "%pdb" magic.
@yassinemessaoudi
@yassinemessaoudi 4 жыл бұрын
Thank you this is Helpful
@Itwasmeeeeeee
@Itwasmeeeeeee 4 жыл бұрын
very useful, goodbye old print() i guess ? :)
configuration management (devops) (intermediate) anthony explains #019
14:46
Каха и дочка
00:28
К-Media
Рет қаралды 3,4 МЛН
How Strong Is Tape?
00:24
Stokes Twins
Рет қаралды 96 МЛН
Command-Line Python Debugging with pdb
12:53
NeuralNine
Рет қаралды 29 М.
python descriptors! (advanced) anthony explains #519
19:04
anthonywritescode
Рет қаралды 18 М.
all about xargs ! (beginner - intermediate) anthony explains #200
17:16
anthonywritescode
Рет қаралды 10 М.
python argparse tutorial (beginner - intermediate) anthony explains #044
21:10
This Is Why Python Data Classes Are Awesome
22:19
ArjanCodes
Рет қаралды 820 М.
How Senior Programmers ACTUALLY Write Code
13:37
Thriving Technologist
Рет қаралды 1,6 МЛН
Каха и дочка
00:28
К-Media
Рет қаралды 3,4 МЛН