Skip to content

Don't apply debugpy.configure() properties when the call fails - #2097

Open
Shriraj Jadhav (Shriraj1901) wants to merge 1 commit into
microsoft:mainfrom
Shriraj1901:configure-atomic
Open

Shriraj Jadhav (Shriraj1901) wants to merge 1 commit into
microsoft:mainfrom
Shriraj1901:configure-atomic

Conversation

@Shriraj1901

Copy link
Copy Markdown

configure() validated and stored its properties one at a time, so a call that raised ValueError for one property still applied the properties that came before it. For example, configure({"qt": "auto", "subProcess": "yes"}) raised "'subProcess' must be a bool" but left qt set to "auto", and the next listen() would go on to enable Qt support the caller never got to configure.

Validate every property first and only then update the configuration, so a failed call leaves it unchanged.

configure() validated and stored its properties one at a time, so a call
that raised ValueError for one property still applied the properties that
came before it. For example, configure({"qt": "auto", "subProcess": "yes"})
raised "'subProcess' must be a bool" but left qt set to "auto", and the
next listen() would go on to enable Qt support the caller never got to
configure.

Validate every property first and only then update the configuration, so a
failed call leaves it unchanged.
@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
There may be pipelines that require an authorized user to comment /azp run to run.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant