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

Remove BlazorWasmDebuggingExtension and get URL information from launchSettings.json #8253

Merged
merged 3 commits into from
Feb 15, 2023

Conversation

thaystg
Copy link
Member

@thaystg thaystg commented Feb 9, 2023

Trying to completely remove the BlazorWasmDebuggingExtension and getting URL information from launchSettings.json

Fixes: dotnet/vscode-csharp#5501

Related: dotnet/vscode-csharp#5579

…ttp://localhost:7104;https://localhost:7105"
@mkArtakMSFT
Copy link
Member

This is an interesting one, @thaystg! I'd love for customers to be able to debug Blazor WASM projects without the need of this extension. But will this change allow to debug projects in all the scenarios where it was possible with the extension?

@thaystg
Copy link
Member Author

thaystg commented Feb 10, 2023

This is an interesting one, @thaystg! I'd love for customers to be able to debug Blazor WASM projects without the need of this extension. But will this change allow to debug projects in all the scenarios where it was possible with the extension?

Probably I'm not the most expert person to answer this question, maybe @captainsafia is the right person.
As far as I know since my last changes we were already only using the inspectUri to correct startup the BrowserDebugProxy and redirect to the right debugging url.
So what I know is: this will allow to debug project in all the scenarios that we already have currently.

We needed to remove the other way to startup the BrowserDebugProxy because it was not possible to detect which was the correct version to start: .net6 or .net7 for example.

@thaystg thaystg marked this pull request as ready for review February 10, 2023 20:15
@thaystg thaystg requested review from a team as code owners February 10, 2023 20:15
Copy link
Contributor

@davidwengier davidwengier left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Deleting code is always good. Deleting whole projects is even better!

const launchSettings = JSON.parse(readFileSync(join(folderPath, 'Properties', 'launchSettings.json'), 'utf8'));
if (launchSettings?.profiles && launchSettings?.profiles[Object.keys(launchSettings.profiles)[0]]?.inspectUri) {
inspectUri = launchSettings.profiles[Object.keys(launchSettings.profiles)[0]].inspectUri;
url = launchSettings.profiles[Object.keys(launchSettings.profiles)[0]].applicationUrl.split(';', 1)[0];
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice to see that we will be trying to get the URL from the launchSettings going forward 👍

@mkArtakMSFT
Copy link
Member

@phil-allen-msft, @davidwengier can you guys merge this given that it's ready to be merged?

result ? result.inspectUri : undefined,
result ? result.debuggingPort : undefined);
inspectUri,
url);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Before, this was the result.debuggingPort, which seems like it would be a number. Now it's a URL; is this expected?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

result.debuggingPort is not used anymore, this is expected.

@thaystg
Copy link
Member Author

thaystg commented May 5, 2023

@mkArtakMSFT this PR is already shipped?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Invalid launch.json configuration created for hosted Blazor apps
4 participants