runtime: dotnet watch (net 6.0 preview 5) - attach to process... not working and no breakpoints hit #18538
Description
I’m trying .net 6 preview 5, I created a blazor webassembly project using the default template. Next I go to the Server project open a command prompt and run dotnet watch.
I go to the counter.razor page and put a breakpoint on currentCount++; (line 15)
In Microsoft Visual Studio Enterprise 2019 Preview (Version 16.11.0 Preview 2.0) I Go to Debug -> Attach to Process…
Issues
- In previous versions of Visual Studio 2019 I could find the processor name belonging to my application. I can’t seem to find the processor exe file listed anymore. Just doesn’t show up in the list.
- So I decided to run
dotnet watch --no-hot-reloadthis time the processor name is displayed in the list and I am able to choose it. But my breakpoint never gets hit - I next decide to abandon using the
dotnet cliand instead just pressF5from within Visual Studio it brings up the it’s cli window and opens the site and breakpoints work correctly. - Using debugging through Visual Studio I noticed that if I tried to change the
counter.razorby updating the<h1>tag nothing changed. Are edits not supported while debugging?
Questions
- Differences between trying to use the
dotnet clidirectly and trying to attach the process? Why can’t I use Debug->Attach to Process and have my breakpoints hit? - Is hot module reloading disabled when debugging within visual studio? i.e. can I edit the the razor page and expect to see pages?
This issue also happens with other app types such asp asp.net core mvc
Configuration
.NET 6.0 preview 5 Visual Studio Enterprise 2019 Preview (Version 16.11.0 Preview 2.0)
Other information
About this issue
- Original URL
- State: closed
- Created 3 years ago
- Comments: 18 (13 by maintainers)
Spoke to our resident debugger expert (@captainsafia) and it sounds like that has never worked. The app must be launched with debugger attached for WASM debugging to work.