@inheritdoc
()
| 40 | |
| 41 | /** @inheritdoc */ |
| 42 | public async prompt() { |
| 43 | if (this.didPromptForSession) { |
| 44 | return; |
| 45 | } |
| 46 | |
| 47 | this.didPromptForSession = true; |
| 48 | |
| 49 | const yes = l10n.t('Yes'); |
| 50 | const never = l10n.t('Never'); |
| 51 | const response = await vscode.window.showInformationMessage( |
| 52 | l10n.t({ |
| 53 | message: |
| 54 | 'VS Code can provide better debugging experience for WebAssembly via "DWARF Debugging" extension. Would you like to install it?', |
| 55 | comment: '"DWARF Debugging" is the extension name and should not be localized.', |
| 56 | }), |
| 57 | yes, |
| 58 | l10n.t('Not Now'), |
| 59 | never, |
| 60 | ); |
| 61 | |
| 62 | if (response === yes) { |
| 63 | this.install(); |
| 64 | } else if (response === never) { |
| 65 | this.context.workspaceState.update(NEVER_REMIND, true); |
| 66 | } |
| 67 | } |
| 68 | |
| 69 | private async install() { |
| 70 | await vscode.window.withProgress( |