Add "Debug: On Errors"

Open
#318,896 0 comments 0 reactions 1 assignee View on GitHub

@roblourens is already working on this.

Since May 29, 2026.

Assessment

This issue has not been assessed yet.

Description

Problem / Motivation

As a Python developer who relies on multiple type checkers (e.g., Pylance, Pyrefly), I currently have to manually create .vscode/launch.json and .vscode/tasks.json for every new project just to wire up pre-launch type checking via preLaunchTask.

This approach has two major pain points:

  1. Repeated boilerplate — every small project needs the same configuration overhead.
  2. CLI-less checkers are excluded — extensions like Pylance have no CLI interface, so they cannot participate in preLaunchTask at all, regardless of how the project is configured.

Proposed Solution

Introduce a new VSCode setting, e.g. debug.onErrors, that controls debug launch behavior when the PROBLEMS panel contains error-level diagnostics:

Value Behavior
debugAnyway (default) Ignore errors and start debugging.
showErrors Show the Problems view and do not start debugging.
prompt Ask the user whether to continue.
abort Cancel debugging.

The default debugAnyway ensures zero behavioral change for existing users who are unaware of this setting.


Expected Benefit

With this change, developers working on small projects can install type checker extensions (Pylance, Pyrefly, etc.) and immediately benefit from error-aware debugging — without creating any .vscode directory or configuration files. This enables a true zero-configuration, out-of-the-box type checking experience. Moreover, users can configure the inspector, and the settings can be synchronized between different devices along with the Profile, instead of having to manually configure it at least once for each project.


Alternatives Considered
  • Using preLaunchTask with CLI-based checkers (e.g., mypy, pyright CLI) — works, but requires per-project setup and excludes CLI-less extensions.
  • Project templates / snippets — reduces repetition but does not solve the Pylance exclusion problem.
Dominant language
TypeScript
Stars
193k
Forks
42.9k
PR merge metrics
PR metrics pending

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/vscode

All issues in microsoft/vscode

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.