diff --git a/src/features/ISECompatibility.ts b/src/features/ISECompatibility.ts index 89c54eb3d2..d48b999c81 100644 --- a/src/features/ISECompatibility.ts +++ b/src/features/ISECompatibility.ts @@ -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