vscode-csharp: Debugger doesn't find PDBs in their original built location
Environment data
dotnet --info output:
.NET Command Line Tools (2.1.202)
Product Information:
 Version:            2.1.202
 Commit SHA-1 hash:  281caedada
Runtime Environment:
 OS Name:     Windows
 OS Version:  10.0.17134
 OS Platform: Windows
 RID:         win10-x64
 Base Path:   C:\Program Files\dotnet\sdk\2.1.202\
Microsoft .NET Core Shared Framework Host
  Version  : 2.0.9
  Build    : 1632fa1589b0eee3277a8841ce1770e554ece037
VS Code version: Latest Stable C# Extension version: 1.15.2
Steps to reproduce
Opening a root workspace with a .sln and a Source/ folder. Build into Output/Debug. However the launch PDB’s build into Source/PROJNAME/obj/Debug/PROJNAME.pdb but is not detected by the extension as I believe it is looking in the Output/Debug folder.
Expected behavior
The extension should check the directory from which the source was built.
Actual behavior
It fails to find the PDB’s.
Loaded 'E:\Development\Example\Output\Debug\bridge\runtime\test1.dll'. Cannot find or open the PDB file.
Loaded 'E:\Development\Example\Output\Debug\bridge\runtime\test2.dll'. Cannot find or open the PDB file.
PDB can be found in:
'E:\Development\Example\Source\test1\obj\Debug\test1.pdb
E:\Development\Example\Source\test2\obj\Debug\test2.pdb
I’ve tried to set the symbolOptions to:
        {
            "name": "Attach",
            "type": "coreclr",
            "request": "attach",
            "processName": "server.exe",
            "symbolOptions": {
                "searchPaths": ["$(workspaceRoot)/Source/../obj/Debug"],
                "searchMicrosoftSymbolServer": false
            },
        }
Without success.
About this issue
- Original URL
 - State: closed
 - Created 6 years ago
 - Comments: 19 (9 by maintainers)
 
Thanks to help from @ChaosCA, I was able to find the problem. Thanks!