Visual Studio 2019 vs 2020 - Debugging container problem

Viewed 98

Is anyone able to offer me some advice...

I've got a repository with 2 solutions in it. Each solution is made up of multiple projects. One solution is .NET 4.8 the other is .NET CORE 3.1.

These solutions run locally in docker containers.

In VS2019 I can attach to process and debug both of these containers/solutions. When I look at the modules window I can see "User Code - Yes" and "Symbol Loaded - Server Side Symbol" (or something similar to that).

In VS2022 I can attach and debug the .NET 4.8 solution but when I attach to the .NET CORE 3.1 solution I get an warning message saying:

"The breakpoint will not currently be hit. No symbols have been loaded for this document".

When I look at the modules window in VS2022, I can see my DLLs are all marked as "User Code - N/A" and "Cannot find or open the PDB file".

Additionally, if I right click the DLLs and select Symbol Load Information, I can see something like this:

C:\solution\src\Project\MyStartUpProject\rendering\bin\container\Debug\netcoreapp3.1\MyComponentProject.pdb: Cannot find or open the PDB file.
C:\solution\src\Project\MyStartUpProject\rendering\bin\container\Debug\netcoreapp3.1\MyComponentProject.pdb: Cannot find or open the PDB file.
C:\solution\src\Feature\MyComponentProject\rendering\obj\container\Debug\netcoreapp3.1\MyComponentProject.pdb: Cannot find or open the PDB file.

What's odd about this is that C:\solution\ is the folder location in the Docker Container, not on my local drive. C:\solution\ is a mounted volume in my container and it mounts to C:\source\reponame\ on my computer, so I guess this is why the PDB file can not be found...

So my questions are...

  1. Why is VS2022 looking at C:\solution\ not C:\source\reponame\ (or some how retrieving the DLLs the same way as VS2019)

and

  1. Is there a way to have VS2022 look in the correct location? (I don't really want to add a Symbol Path to VS for each project I work on, especially as these could change).

Cheers,

Dan

0 Answers
Related