-
Hi everyone! This might be a silly question from a long-time PuDB user, but for some reason I can't figure it out. How do I get PuDB to pause and show me the PuDB UI when there's an exception? Right now I'm using Thanks for your help, |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 1 reply
-
Two ways:
|
Beta Was this translation helpful? Give feedback.
-
Thank you for the quick reply Andreas. Unfortunately I work in a corporate
environment where a complicated build process is running my Python program,
so I can't just slip `-m pudb` in there.
Regarding the second option, that would require knowing which exception it
is in advance :(
Is there no other way to do that?
…On Tue, Nov 16, 2021 at 7:38 AM Andreas Klöckner ***@***.***> wrote:
Two ways:
- Run your script with python -m pudb myscript.py.
- Catch the exception and run pudb.pm() in the except clause. (See #486
<#486> for some possible fixes to
that.)
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#488 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAAN3SVMCF6NC657TAUJYBTUMHU5HANCNFSM5IDKTR6Q>
.
Triage notifications on the go with GitHub Mobile for iOS
<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675>
or Android
<https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>.
|
Beta Was this translation helpful? Give feedback.
-
Ah, I didn't consider wrapping the entire program! Yes, this sounds like it
could work. Thank you!
…On Tue, Nov 16, 2021 at 5:44 PM Andreas Klöckner ***@***.***> wrote:
Regarding the second option, that would require knowing which exception it
is in advance :(
Can't you just catch Exception? (see the snippet in the description of
#486 <#486> for an example)
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#488 (reply in thread)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAAN3SWYTUYI42VQNP2EQEDUMJ37FANCNFSM5IDKTR6Q>
.
Triage notifications on the go with GitHub Mobile for iOS
<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675>
or Android
<https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>.
|
Beta Was this translation helpful? Give feedback.
Two ways:
python -m pudb myscript.py
.pudb.pm()
in theexcept
clause. (See #486 for some possible fixes to that.)