3 ms·
> Most languages (including Python, AFAIK) unwind the stack when an exception is thrown, all the way up to the nearest catch. You might have to use a few trick
by kortex 2y ago
> Most languages (including Python, AFAIK) unwind the stack when an exception is thrown, all the way up to the nearest catch.
You might have to use a few tricks/hacks, but I'm pretty sure you can set up python in a way to breakpoint at an exception, including all local state at the throw site. Otherwise pdb would not work.
- pyuser583 2y agoDefinitely. It’s very possible to pause (pdb-like) or persist the local state/stack. But there needs to be an actual exception. If someone pulls the power cord, you’re out of luck.