-
Notifications
You must be signed in to change notification settings - Fork 676
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
[blazor-wasm] Not launching correct OS specific browser #4108
Comments
Thanks for reporting this, @ar0311. The @gregg-miskelly Is this something the JS debugger supports? I don't believe so but I might be incorrect here. |
I know that the C# extension supports it for launching a browser without debugging when using the somewhat-deprecated |
js-debug supports this if you toggle the |
Took a look at this. The OS-specific options are supported by the O# configuration and allow a user to override what command is used to launch the browser, for example how to use Given that the |
Where is chrome.exe located on your systems? |
"C:\Program Files (x86)\Google\Chrome Dev\Application\chrome.exe" |
If I change the name of the folder from "Chrome Dev" to "Chrome", the error message does not appear, and my Chrome does launch. Guessing that could cause other problems if I do that though. |
Thanks, fixed in the linked commit. It'll ship in the next nightly js debugger. |
We should be able to detect that if the If it's not set you might be hitting microsoft/vscode#106537 |
That means the built-in extension is still installed (and probably stealing launches, which explains the issue). Make sure to do steps 1 and 2 here! https://github.com/microsoft/vscode-js-debug#nightly-extension |
Ok, that makes more sense. @captainsafia is there a way to pass the runtimeExecutable through the blazor launch to js-debug? |
@connor4312 Nope, we can add this if enough people express interest in it. @jtsom As an alternative, you can try falling back to a two-step launch configuration by launching the application server via the .NET debugger and the front-end client by using the JS debugger. |
@jtsom here's another alternative that will arrive in the next js-debug nightly microsoft/vscode-js-debug#836 |
I will give it a try when it drops. Though will it work with the standard launch.json, created by default with the .Net Generate Assets command, given your comment:
|
It will since blazor launches pwa-chrome internally |
Issue Description
When specifying browser to launch using "blazorwasm" debug type, it is only respected when using the root "browser" option. It is not respected when using stanza under OS such as "windows".
Steps to Reproduce
On windows, make sure Chrome is installed and set as default browser. Also make sure Edge is installed.
Edit launch.json in project using "blazorwasm" debug type, add
"browser": "edge"
Launch and confirm Edge was launched.
Stop debugging, edit launch.json:
"windows": {
"browser": "edge"
}
Launch and Chrome (default browser) is launched.
Expected Behavior
Edge is launched.
Actual Behavior
Chrome is launched.
Environment information
VSCode version: 1.50.0
C# Extension: 1.23.3
Dotnet Information
.NET SDK (reflecting any global.json): Version: 5.0.100-rc.2.20480.7 Commit: 53e0c8c7f9Runtime Environment:
OS Name: Windows
OS Version: 10.0.19041
OS Platform: Windows
RID: win10-x64
Base Path: C:\Program Files\dotnet\sdk\5.0.100-rc.2.20480.7\
Host (useful for support):
Version: 5.0.0-rc.2.20475.5
Commit: c5a3f49c88
.NET SDKs installed:
3.1.402 [C:\Program Files\dotnet\sdk]
5.0.100-rc.2.20480.7 [C:\Program Files\dotnet\sdk]
.NET runtimes installed:
Microsoft.AspNetCore.App 3.1.8 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 5.0.0-rc.2.20475.17 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.NETCore.App 3.1.8 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 5.0.0-rc.2.20475.5 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.WindowsDesktop.App 3.1.8 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
Microsoft.WindowsDesktop.App 5.0.0-rc.2.20475.6 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
To install additional .NET runtimes or SDKs:
https://aka.ms/dotnet-download
Visual Studio Code Extensions
The text was updated successfully, but these errors were encountered: