Skip to content

Fix EnableISEMode for Azure Data Studio #3735

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
Dec 21, 2021
Merged
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
10 changes: 9 additions & 1 deletion src/features/ISECompatibility.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,15 @@ export class ISECompatibilityFeature implements vscode.Disposable {

private async EnableISEMode() {
for (const iseSetting of ISECompatibilityFeature.settings) {
await vscode.workspace.getConfiguration(iseSetting.path).update(iseSetting.name, iseSetting.value, true);
try {
await vscode.workspace.getConfiguration(iseSetting.path).update(iseSetting.name, iseSetting.value, true);
} catch {
// The `update` call can fail if the setting doesn't exist. This
// happens when the extension runs in Azure Data Studio, which
// doesn't have a debugger, so the `debug` setting can't be
// updated. Unless we catch this exception and allow the
// function to continue, it throws an error to the user.
}
}

// Show the PowerShell Command Explorer
Expand Down