-
Notifications
You must be signed in to change notification settings - Fork 145
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Break debugger on exceptions that aren't handled inside a pytest test #111
Comments
The problem here is that we're not treating the exception is uncaught. I think this is because it's caught by pytest. However, pytest is library code, not user code; and we run with @fabioz, does this sound feasible? |
@madig As a partial workaround, you can try checking "Raised exceptions" in the Breakpoints pane. The downside is that it'll also report exceptions that you throw and then handle in your code. |
I've renamed from my understanding of the request (please correct it if I understood wrong). Well, the problem is that technically this isn't an uncaught exception (because as @int19h mentioned, it's caught by pytest)... I don't think it's feasible to report it as uncaught before actually being uncaught (this isn't the actual semantic of uncaught exceptions and breaking it makes the handling quite tricky)... maybe it'd be possible to have a |
There is |
Ok, I'll try to come up with a proper implementation for |
/cc @rchiodo |
Any updates? I find myself wanting this functionality just about every day... 🙂 |
Not yet (I have 2 other issues in the queue before getting this one, so, I'd say I'll probably get to it in a couple of weeks). |
Note: I'm starting to take a look at this now. |
When running "Debug Test" from the code edit view, the test output pane shows me pytest's error message when it encounters an uncaught exception, but I would like it to launch a debugger instead. I currently have to insert a try/catch with a
breakpoint()
otherwise.I actually feel this should have been requested already but could find neither an issue nor a setting for this...
The text was updated successfully, but these errors were encountered: