Skip to content

Commit

Permalink
Merge pull request #5579 from thaystg/thays_remove_blazor_debugging_e…
Browse files Browse the repository at this point in the history
…xtension

Removing blazor debugging extension
  • Loading branch information
dibarbet authored Nov 27, 2023
2 parents e5c352d + b93cd26 commit cf15b59
Showing 1 changed file with 0 additions and 23 deletions.
23 changes: 0 additions & 23 deletions src/omnisharp/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -169,8 +169,6 @@ export async function requestProjectInformation(server: OmniSharpServer, request
export async function requestWorkspaceInformation(server: OmniSharpServer) {
const response = await server.makeRequest<protocol.WorkspaceInformationResponse>(protocol.Requests.Projects);
if (response.MsBuild && response.MsBuild.Projects) {
let blazorWebAssemblyProjectFound = false;

for (const project of response.MsBuild.Projects) {
project.IsWebProject = isWebProject(project.Path);

Expand All @@ -188,13 +186,6 @@ export async function requestWorkspaceInformation(server: OmniSharpServer) {
project.IsBlazorWebAssemblyHosted = isProjectBlazorWebAssemblyHosted;
project.IsBlazorWebAssemblyStandalone =
isProjectBlazorWebAssemblyProject && !project.IsBlazorWebAssemblyHosted;

blazorWebAssemblyProjectFound = blazorWebAssemblyProjectFound || isProjectBlazorWebAssemblyProject;
}

if (blazorWebAssemblyProjectFound && !vscode.extensions.getExtension('ms-dotnettools.blazorwasm-companion')) {
// No need to await this call, we don't depend on the prompt being shown.
showBlazorDebuggingExtensionPrompt(server);
}
}

Expand Down Expand Up @@ -357,17 +348,3 @@ export async function resolveInlayHints(
) {
return server.makeRequest<protocol.InlayHint>(protocol.Requests.InlayHintResolve, request, context);
}

async function showBlazorDebuggingExtensionPrompt(server: OmniSharpServer) {
const promptShownKey = 'blazor_debugging_extension_prompt_shown';
if (!server.sessionProperties[promptShownKey]) {
server.sessionProperties[promptShownKey] = true;

const msg = 'The Blazor WASM Debugging Extension is required to debug Blazor WASM apps in VS Code.';
const result = await vscode.window.showInformationMessage(msg, 'Install Extension', 'Close');
if (result === 'Install Extension') {
const uriToOpen = vscode.Uri.parse('vscode:extension/ms-dotnettools.blazorwasm-companion');
await vscode.commands.executeCommand('vscode.open', uriToOpen);
}
}
}

0 comments on commit cf15b59

Please sign in to comment.