Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 2384b7c

Browse files
Fix EnableISEMode for Azure Data Studio (#3735)
Because ADS stripped out VS Code's debugger, the `debug` settings don't exist, causing our `update()` call for the debug setting to throw an error to the user when they run `EnableISEMode`. I couldn't find a reliable way to test if the extension is running in the ADS fork instead of the upstream VS Code, but a simple `try {} catch {}` that allows the funciton to continue is a reliable fix, as we can't do anything about this setting regardless.
1 parent 43cf7d1 commit 2384b7c

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

‎src/features/ISECompatibility.ts‎

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,15 @@ export class ISECompatibilityFeature implements vscode.Disposable {
4242

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

4856
// Show the PowerShell Command Explorer

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /