Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
62 changes: 62 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -186,6 +186,37 @@
},
"type": "object"
},
"breakOnSystemExit": {
"description": "Controls which SystemExit exit codes cause the debugger to break. Accepts an array of exit codes and/or inclusive ranges. Set to an empty array to never break on SystemExit. When omitted, the debugger's default applies: successful exits (SystemExit(0) and SystemExit(None), plus 3 under Django/Flask) are ignored, and any other code causes a break when uncaught-exception breaking is enabled.",
"type": "array",
"items": {
"oneOf": [
{
"type": "integer",
"description": "A specific SystemExit code to break on."
},
{
"type": "object",
"additionalProperties": false,
"description": "An inclusive range of SystemExit codes to break on.",
"properties": {
"from": {
"type": "integer",
"description": "Lower bound of the range (inclusive)."
},
"to": {
"type": "integer",
"description": "Upper bound of the range (inclusive)."
}
},
"required": [
"from",
"to"
]
}
]
}
},
"connect": {
"label": "Attach by connecting to debugpy over a socket.",
"properties": {
Expand Down Expand Up @@ -405,6 +436,37 @@
},
"type": "object"
},
"breakOnSystemExit": {
"description": "Controls which SystemExit exit codes cause the debugger to break. Accepts an array of exit codes and/or inclusive ranges. Set to an empty array to never break on SystemExit. When omitted, the debugger's default applies: successful exits (SystemExit(0) and SystemExit(None), plus 3 under Django/Flask) are ignored, and any other code causes a break when uncaught-exception breaking is enabled.",
"type": "array",
"items": {
"oneOf": [
{
"type": "integer",
"description": "A specific SystemExit code to break on."
},
{
"type": "object",
"additionalProperties": false,
"description": "An inclusive range of SystemExit codes to break on.",
"properties": {
"from": {
"type": "integer",
"description": "Lower bound of the range (inclusive)."
},
"to": {
"type": "integer",
"description": "Upper bound of the range (inclusive)."
}
},
"required": [
"from",
"to"
]
}
]
}
},
"console": {
"default": "integratedTerminal",
"description": "Where to launch the debug target: internal console, integrated terminal, or external terminal.",
Expand Down
8 changes: 8 additions & 0 deletions src/extension/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,11 @@ export type PathMapping = {
remoteRoot: string;
};

export type SystemExitRange = {
from: number;
to: number;
};

type Connection = {
host?: string;
port?: number | string;
Expand All @@ -69,6 +74,9 @@ interface ICommonDebugArguments {
// Show return values of functions while stepping.
showReturnValue?: boolean;
subProcess?: boolean;
// SystemExit codes (and/or inclusive ranges) that cause the debugger to break.
// An empty array disables breaking on SystemExit entirely.
breakOnSystemExit?: (number | SystemExitRange)[];
// An absolute path to local directory with source.
pathMappings?: PathMapping[];
}
Expand Down
Loading