@@ -105,6 +105,7 @@ export async function requestWorkspaceInformation(server: OmniSharpServer) {
105
105
}
106
106
107
107
if ( blazorWebAssemblyProjectFound && ! vscode . extensions . getExtension ( 'ms-dotnettools.blazorwasm-companion' ) ) {
108
+ // No need to await this call, we don't depend on the prompt being shown.
108
109
showBlazorDebuggingExtensionPrompt ( server ) ;
109
110
}
110
111
}
@@ -248,18 +249,16 @@ function isWebProject(project: MSBuildProject): boolean {
248
249
return projectFileText . toLowerCase ( ) . indexOf ( 'sdk="microsoft.net.sdk.web"' ) >= 0 ;
249
250
}
250
251
251
- function showBlazorDebuggingExtensionPrompt ( server : OmniSharpServer ) {
252
+ async function showBlazorDebuggingExtensionPrompt ( server : OmniSharpServer ) {
252
253
const promptShownKey = 'blazor_debugging_extension_prompt_shown' ;
253
254
if ( ! server . sessionProperties [ promptShownKey ] ) {
254
255
server . sessionProperties [ promptShownKey ] = true ;
255
256
256
257
const msg = 'The Blazor WASM Debugging Extension is required to debug Blazor WASM apps in VS Code.' ;
257
- vscode . window . showInformationMessage ( msg , 'Install Extension' , 'Close' )
258
- . then ( async result => {
259
- if ( result === 'Install Extension' ) {
260
- const uriToOpen = vscode . Uri . parse ( 'vscode:extension/ms-dotnettools.blazorwasm-companion' ) ;
261
- await vscode . commands . executeCommand ( 'vscode.open' , uriToOpen ) ;
262
- }
263
- } ) ;
258
+ const result = await vscode . window . showInformationMessage ( msg , 'Install Extension' , 'Close' ) ;
259
+ if ( result === 'Install Extension' ) {
260
+ const uriToOpen = vscode . Uri . parse ( 'vscode:extension/ms-dotnettools.blazorwasm-companion' ) ;
261
+ await vscode . commands . executeCommand ( 'vscode.open' , uriToOpen ) ;
262
+ }
264
263
}
265
264
}
0 commit comments