question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Debugger doesn't find PDBs in their original built location

See original GitHub issue

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.

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:19 (9 by maintainers)

github_iconTop GitHub Comments

1reaction
gregg-miskellycommented, Oct 2, 2018

Thanks to help from @ChaosCA, I was able to find the problem. Thanks!

0reactions
braunsonmcommented, Nov 2, 2018

Works! Thanks again @gregg-miskelly

Read more comments on GitHub >

github_iconTop Results From Across the Web

'cannot find or open the pdb file' Visual Studio C++ 2013
Try go to Tools->Options->Debugging->Symbols and select checkbox "Microsoft Symbol Servers", Visual Studio will download PDBs automatically.
Read more >
Symbol / PDB files in the Visual Studio debugger
By default, if you have built a DLL or an .exe file on your computer, the linker places the full path and filename...
Read more >
Debug modules that have no debug information (PDB)
Visual Studio: on the Tools | Options | Debugging | Symbols options page, make sure that the Cache symbol in this directory field...
Read more >
PDB Files: What Every Developer Must Know - Atmosera
The first place searched is the directory where the binary was loaded. If the PDB file is not there, the second place the...
Read more >
pdb — The Python Debugger — Python 3.11.1 documentation
pdbrc file, see Debugger Commands. New in version 3.7: pdb.py now accepts a -m option that execute modules ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found