dotnet / runtime

.NET is a cross-platform runtime for cloud, mobile, desktop, and IoT apps.
https://docs.microsoft.com/dotnet/core/
MIT License
14.91k stars 4.63k forks source link

[blazor][debugger] Unable to debug in lazy loaded assemblies with remote authentication failed #97198

Open Arsync opened 7 months ago

Arsync commented 7 months ago

Description

When remote authentication failed for some reasons (authority not found, login required, etc), breakpoint in lazy assembly will work only at first page, but when you try to open other pages in that assembly, breakpoints will be hit only if target page was changed from last debug session.

Issue based on #96736

Reproduction Steps

Repo: https://github.com/Arsync/bug-blazor-lazyload-net8

  1. Launch server project, it will navigate directly to /lazy page with 'launchUrl' defined in launchSettings.json
  2. Breakpoint will be hit at first page (always).
  3. Click at link "Now click here" and navigate to the '/lazy-second' page
  4. Perhaps, at first launch breakpoint will be hit.
  5. Re-run debugging, now the second page will not stopped at line 28.
  6. Do some text changes in LazySecondPage.razor and run project again
  7. Breakpoint matched
  8. Repeat

Expected behavior

Breakpoints should be hit in assemblies lazy loaded in .NET 8

Actual behavior

Breakpoints doesn't hit in assemblies lazy loaded until target page has no changes in source code after last debug session.

Regression?

No response

Known Workarounds

No response

Configuration

.NET Version 8.0.100 Visual Studio Version 17.8.5

Other information

No response

ghost commented 7 months ago

Tagging subscribers to this area: @thaystg See info in area-owners.md if you want to be subscribed.

Issue Details
### Description When remote authentication failed for some reasons (authority not found, login required, etc), breakpoint in lazy assembly will work only at first page, but when you try to open other pages in that assembly, breakpoints will be hit only if target page was changed from last debug session. Issue based on #96736 ### Reproduction Steps Repo: https://github.com/Arsync/bug-blazor-lazyload-net8 1. Launch server project, it will navigate directly to /lazy page with 'launchUrl' defined in launchSettings.json 2. Breakpoint will be hit at first page (always). 3. Click at link "Now click here" and navigate to the '/lazy-second' page 4. Perhaps, at first launch breakpoint will be hit. 5. Re-run debugging, now the second page will not stopped at line 28. 6. Do some text changes in LazySecondPage.razor and run project again 7. Breakpoint matched 8. Repeat ### Expected behavior Breakpoints should be hit in assemblies lazy loaded in .NET 8 ### Actual behavior Breakpoints doesn't hit in assemblies lazy loaded until target page has no changes in source code after last debug session. ### Regression? _No response_ ### Known Workarounds _No response_ ### Configuration .NET Version 8.0.100 Visual Studio Version 17.8.5 ### Other information _No response_
Author: Arsync
Assignees: -
Labels: `area-Debugger-mono`
Milestone: -
Arsync commented 6 months ago

.NET Version 8.0.200 Visual Studio Version 17.9

Issue still here with the same behavior.