Closed maurice-freitag closed 3 years ago
Thanks for opening this issue, @maurice-freitag! It's very complete and helpful.
Indeed, it looks like the JS debugger is having trouble communicating with the debugging proxy. Can you confirm the following:
Thanks for the quick reply @captainsafia
What is the standard output displayed for your application? You should see the text printed for the running application server (on port 5001) as well as the proxy server (on port 58762 above but typically some other random port). This is the output:
info: Microsoft.Hosting.Lifetime[0] Now listening on: http://localhost:5000 info: Microsoft.Hosting.Lifetime[0] Application started. Press Ctrl+C to shut down. info: Microsoft.Hosting.Lifetime[0] Hosting environment: Development info: Microsoft.Hosting.Lifetime[0] Content root path: C:\[...] Hosting environment: Development Content root path: C:\[...]
The next line should be
Now listening on: http://127.0.0.1:12345
but it stops there.Can you reproduce the error when debugging in the browser? Users have reported that VS can sometimes cache some stale data and cause debugging sessions to fail where it was previously working. If debugging in the browser works, it indicates that this might be the issue.
I think you're right. Debugging in the browser never stopped working and I just downloaded another browser and the issue is not present with that. Before I delete the cached data on my regular browser, is there any data that might be of interest?
@captainsafia please let us know if there is any actions pending for us here.
The JS Debugger team will be looking into this. They track their work internally. No further action is pending here, so closing this issue.
Summary
We're currently building a web client for an already existing, somewhat large code base using Blazor WebAssembly. Debugging using the browser dev tools has proven very time consuming so far, I would like to start the client project directly. I know this is possible when creating a new project using the official Blazor project template. Some change we made to our project however prevents the browser from launching and thus establishing a browser link for debugging. Navigating to the application URL works on its own but no breakpoints are hit of course.
Reproduction
Reproduction is not really an option as there are far too many changes made to be sure what caused the issue. Could some package or project reference cause this? The project was created using the default project template for WebAssembly apps without authentication and with the following options:
Creating a new project with this configuration allows you to set the client project as startup project. Debugging will launch a browser, breakpoints will be hit. This leads me to believe that there must be some change I made that causes this to not work in my project. What's confusing to me is the fact that the app is running just fine, the issue comes up before the Main method is even hit. The only hint I have at the moment is in
visualstudio-js-debugger.txt
, where it says that js-debug (?) makes an attempt to launch something on port 58762, followed by some connection refused errors ([...]Error looking up /json/version
[...]).Files & Information
vs
dotnet
launchsettings.json:
** neither profile works
visualstudio-js-debugger.txt