Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Removing blazor debugging extension #5579

Merged
merged 5 commits into from
Nov 27, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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);
}
}
}
Loading