Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

Pytest: stop on any failure in tests

Open
#1,873 7 comments 1 reaction 1 assignee View on GitHub

@judej is already working on this.

Since Mar 18, 2025.

Assessment

This issue has not been assessed yet.

Description

enhancement

When I’m debugging a test with VSCode, I’m expecting the debugger to automatically add a breakpoint at the line where the test is failing.

This is the behavior of pytest with the option --pdb, so I think it’s reasonable to expect the same when using it with VSCode.

In the FAQ the recommended solution is to use "User Uncaught Exceptions". However this is not practical with any "real world" codebase: breakpoints are added in a lot of exceptions handled by third parties or Python itself (see #1248, #1102, #1155, …). In my case I would have to skip dozens of breakpoints each time, and those exceptions are legitimate.

Note: this feature has been requested before (#722, #723, #1103), but the suggested solutions did not work for me.

Dominant language
Python
Stars
2.5k
Forks
202
Avg merge
5d 1h
Merged PRs (30d)
1

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from microsoft/debugpy

All issues in microsoft/debugpy

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.