Skip to content

Add breakOnSystemExit setting to launch/attach configuration schema - #1078

Merged
rchiodo merged 3 commits into
microsoft:mainfrom
rchiodo:rchiodo-add-pyrefly-exclude-setting
Jul 29, 2026
Merged

Add breakOnSystemExit setting to launch/attach configuration schema#1078
rchiodo merged 3 commits into
microsoft:mainfrom
rchiodo:rchiodo-add-pyrefly-exclude-setting

Conversation

@rchiodo

@rchiodo rchiodo commented Jul 29, 2026

Copy link
Copy Markdown
Contributor

Exposes debugpy's new breakOnSystemExit option (microsoft/debugpy#2017) in the extension's launch.json / attach configuration schema, as requested in microsoft/debugpy#1591.

What

  • Adds the breakOnSystemExit attribute to both the launch and attach configurationAttributes in package.json (IntelliSense + validation in launch.json).
  • Adds the matching breakOnSystemExit?: (number | SystemExitRange)[] field and SystemExitRange type to ICommonDebugArguments in src/extension/types.ts.

Behavior

breakOnSystemExit accepts an array of exit codes and/or inclusive { "from", "to" } ranges, controlling which SystemExit codes cause the debugger to break:

  • [] — never break on SystemExit
  • [1, 2] — break only on codes 1 and 2
  • [{ "from": 3, "to": 100 }] — break on codes 3-100 (inclusive)
  • omitted — debugpy's existing default behavior (break on all non-zero exit codes, ignoring successful exits)

The value is passed straight through to debugpy, which parses it; no config-resolver changes are required.

Testing

  • tsc --noEmit passes with no errors.
  • package.json validated as well-formed JSON.

Exposes debugpy's breakOnSystemExit option (microsoft/debugpy#2017) in the extension's launch.json/attach configuration schema and TypeScript debug config types. Accepts an array of exit codes and/or inclusive {from,to} ranges to control which SystemExit codes cause the debugger to break.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

Copilot-Session: 24c2d34b-15f0-45d2-bd59-8ee042269d20
@rchiodo rchiodo added the feature-request Request for new features or functionality label Jul 29, 2026
@rchiodo
rchiodo enabled auto-merge (squash) July 29, 2026 17:02
bschnurr
bschnurr previously approved these changes Jul 29, 2026
Describe the default as an ignore-list ({0, None}, plus 3 under Django/Flask) that breaks on any other code when uncaught-exception breaking is enabled, rather than the looser 'break on all non-zero exit codes'.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

Copilot-Session: 24c2d34b-15f0-45d2-bd59-8ee042269d20
@rchiodo
rchiodo merged commit 8261fe9 into microsoft:main Jul 29, 2026
17 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feature-request Request for new features or functionality

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants