Debug Symbols Built But NOT Loaded?

214 Views Asked by At

I have a Blazor / WASM core hosted solution with six projects:

  • Company.Common
  • Company.Data.Context
  • Company.Data.Models
  • Company.Razor.Ui
  • Company.Web.Client
  • Company.Web.Server

enter image description here

When I build these projects I can go to the bin and obj folders and see the .pdb files are being built. However when I debug the project and go to Debug > Windows > Modules only four of the projects have symbols loaded. The other two don't even show up.

enter image description here

The frustrating part is that it was working earlier and we haven't changed anything at all. I have tried the following:

  • Clean and Rebuild
  • Reboot the PC
  • Tools > Debugging > Symbols > Empty Symbol Cache
  • Compared the .csproj files to each other
  • Compared the .csproj files to previous versions in source control
  • Verified that the .pdb files are in the correct folders

I've looked at all of the settings and can't figure out why only 4 of the 6 projects load symbols when we debug. This seems to be happening randomly. We can debug the other projects BTW.

1

There are 1 best solutions below

0
Dou Xu-MSFT On

The Modules window lists and shows information about the DLLs and executables (.exe files) your app uses. For this issue, here are suggestions you can check.

1.Please check the project file of the project you debugged but only four of the projects have symbols loaded.

project file example

 <ItemGroup>
   <ProjectReference Include="..\Project1\Project1.csproj" />
   <ProjectReference Include="..\Project1\Project2.csproj" />
   <ProjectReference Include="..\Project1\Project3.csproj" />
 </ItemGroup>

Then confirm how many projects the project you debugged referred. If you only refer 4 projects, the Debug|Modules will show 4 symbols.

2.Please open symbols settings and make sure you load all modules and have no excluded modules. enter image description here

3.Please use the lm command to verify that the symbols are loaded correctly for the modules you want to debug.

https://learn.microsoft.com/en-us/windows-hardware/drivers/debugger/verifying-symbols

Hope it can help you.