Skip to content

Removing restriction when using purpose #18290

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

Merged
merged 1 commit into from
Jan 14, 2022
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
1 change: 1 addition & 0 deletions news/2 Fixes/18248.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Remove restrictions on using `purpose` in debug configuration.
Original file line number Diff line number Diff line change
Expand Up @@ -67,18 +67,6 @@ export class PythonDebugConfigurationService implements IDebugConfigurationServi
throw Error(
'This configuration can only be used by the test debugging commands. `"request": "test"` is deprecated use "purpose" instead.',
);
} else if (
debugConfiguration.request === 'launch' &&
((debugConfiguration as LaunchRequestArguments).purpose ?? []).length > 0
) {
// We reach here only if people try to use debug-test or debug-in-terminal purpose for
// launching a file via F5 or "start with debugging".
// debug-test : is not allowed to be launched via (F5 or "start with debugging") since it
// requires test framework specific configuration that is done in the test
// debug launcher.
// debug-in-terminal : is not allowed because we may update the configuration based on
// editor context where it was triggered.
throw Error('This configuration can only be used as defined by `purpose`.');
} else {
if (Object.keys(debugConfiguration).length === 0) {
if (this.cacheDebugConfig) {
Expand Down