Skip to content

Unbound breakpoint in VS Code when debugging Blazor WASM hosted app on Ubuntu 20.04 #22673

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

Closed
gp2-gp2 opened this issue Jun 8, 2020 · 9 comments
Assignees
Labels
area-blazor Includes: Blazor, Razor Components External This is an issue in a component not contained in this repository. It is open for tracking purposes. feature-blazor-wasm This issue is related to and / or impacts Blazor WebAssembly Status: Resolved
Milestone

Comments

@gp2-gp2
Copy link

gp2-gp2 commented Jun 8, 2020

Describe the bug

I cannot set a breakpoint when debugging a WASM hosted app on VS Code (Ubuntu 20.04) following the instructions here: https://docs.microsoft.com/en-us/aspnet/core/blazor/debug?view=aspnetcore-3.1

To Reproduce

  1. Create a new WASM project: dotnet new blazorwasm --hosted --output Foo --pwa
  2. Follow VS Code debugging instructions here: https://docs.microsoft.com/en-us/aspnet/core/blazor/debug?view=aspnetcore-3.1
  3. Set a breakpoint in the IncrementCount method in the Counter component (Counter.razor).

Expected: Breakpoint resolves
Actual: Unbound breakpoint

Exceptions (if any)

I do not face any exceptions.

Further technical details

dotnet SDK: 3.1.300
VSCode:
Version: 1.45.1
Commit: 5763d909d5f12fe19f215cbfdd29a91c0fa9208a
Date: 2020-05-14T08:27:22.494Z
Electron: 7.2.4
Chrome: 78.0.3904.130
Node.js: 12.8.1
V8: 7.8.279.23-electron.0
OS: Linux x64 5.4.0-33-generic snap

Developer Certificate is trusted in Linux by following those 2 tutorials:
https://stackoverflow.com/questions/55485511/how-to-run-dotnet-dev-certs-https-trust
https://stackoverflow.com/questions/7580508/getting-chrome-to-accept-self-signed-localhost-certificate
And app is accessed in Chrome by https and port 5001

Exact same project just debugs perfectly under VS Code in Windows 10.

@captainsafia captainsafia added area-blazor Includes: Blazor, Razor Components feature-blazor-wasm This issue is related to and / or impacts Blazor WebAssembly labels Jun 8, 2020
@captainsafia
Copy link
Member

@gp2-gp2 Have you trusted dev certificates in your environment? This is common culprit for debugging not working.

@gp2-gp2
Copy link
Author

gp2-gp2 commented Jun 9, 2020

@captainsafia yes I did, as stated above I followed 2 different stackoverflow guides as there is no clear process for Linux like you offer for Windows/Mac with dotnet dev-certs https --trust
Final outcome is that the app is working in Chrome under https and port 5001 and Chrome is showing the certificate is trusted.
But maybe something is still missing and therefore it's not working as expected.
Do you have any official guide that could be followed for Ubuntu for trusting the dev certificate?

@mkArtakMSFT mkArtakMSFT added this to the Discussions milestone Jun 9, 2020
@mkArtakMSFT mkArtakMSFT removed this from the Discussions milestone Jun 9, 2020
@mkArtakMSFT mkArtakMSFT added this to the Next sprint planning milestone Jun 9, 2020
@mkArtakMSFT
Copy link
Contributor

Thanks for contacting us.
We're moving this issue to the Next sprint planning milestone for future evaluation / consideration. We will evaluate the request when we will planning the work for the next milestone. To learn more about what to expect next and how this issue will be handled you can read more about our triage process here.

@captainsafia
Copy link
Member

Do you have any official guide that could be followed for Ubuntu for trusting the dev certificate?

If the app is working when you visit the https:// URL in the browser then it should be good to go.

A couple more things to try:

  • Does debugging work if you set url: "http://localhost:5000" in your launch.json?
  • Can you share the log file that is generated when you set trace: true in your launch.json?

@gp2-gp2
Copy link
Author

gp2-gp2 commented Jun 9, 2020

@captainsafia log file is attached in ZIP file.

I was not looking before on this console as by default it was showing output from
.NET Core Launch where there was no issue reported. But the output from Debug Blazor Web Assembly in Browser shows this issues:

Note: Using the "preview" debug extension
Verbose logs are written to:
/home/gp2/.config/Code/logs/20200609T193533/exthost1/ms-vscode.js-debug-nightly/vscode-debugadapter-1.json

DevTools listening on ws://127.0.0.1:33279/devtools/browser/ddd5295f-f2cd-40ab-a10f-f180959b0cc4
[11562:11562:0609/193907.194495:ERROR:sandbox_linux.cc(374)] InitializeSandbox() called with multiple threads in process gpu-process.
Debugging hotkey: Shift+Alt+D (when application has focus)
localhost꞉5001/_framework/blazor.webassembly.js:1
�[0m�[48;5;127m�[38;5;231mblazor�[0m�[1m Loaded 6.15 MB resources
�[0mThis application was built with linking (tree shaking) disabled. Published applications will be significantly smaller.�[0m
>>>mono_wasm_get_loaded_files
localhost꞉5001/_framework/wasm/dotnet.3.2.0.js:1
mono_wasm_runtime_ready fe00e07a-5519-4dfe-b35a-f867dbaf2e28
localhost꞉5001/_framework/wasm/dotnet.3.2.0.js:1
[0609/193929.564290:ERROR:nacl_helper_linux.cc(308)] NaCl helper process running without a sandbox!
Most likely you need to configure your SUID sandbox correctly

vscode-debugadapter-1.zip

@gp2-gp2
Copy link
Author

gp2-gp2 commented Jun 9, 2020

Forgot to add that running under http://localhost:5000 doesn't help, debug still not working.

@captainsafia
Copy link
Member

[0609/193929.564290:ERROR:nacl_helper_linux.cc(308)] NaCl helper process running without a sandbox!
Most likely you need to configure your SUID sandbox correctly

This bit here looks a little suspicious.

@gregg-miskelly It seems a little strange that the error above would cause the "Unbound breakpoint" issue to happen. I would expect it to not launch the debugging session at all. Have you seen something like this on Linux before?

@gregg-miskelly
Copy link

This isn't an area that I know anything about. Based on this stackoverflow question it sounds like this is a problem with Chrome.

@captainsafia
Copy link
Member

@gregg-miskelly Yep. I found the same issue. I was wondering why the Chrome browser would launch in the first place since the StackOverflow issue seemed to indicate that launching Chrome would fail.

@gp2-gp2 I'd recommend fixing the Chrome installation on your machine and seeing if that resolves the issue. If it doesn't please request to re-open the issue.

For the time being, I'll close this as external.

@captainsafia captainsafia added External This is an issue in a component not contained in this repository. It is open for tracking purposes. Status: Resolved and removed investigate labels Jun 30, 2020
@ghost ghost locked as resolved and limited conversation to collaborators Jul 30, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-blazor Includes: Blazor, Razor Components External This is an issue in a component not contained in this repository. It is open for tracking purposes. feature-blazor-wasm This issue is related to and / or impacts Blazor WebAssembly Status: Resolved
Projects
None yet
Development

No branches or pull requests

4 participants