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.

"Cannot find or open the PDB file" pops up after debugging

See original GitHub issue

Environment data

dotnet --info output: .NET Core SDK (reflecting any global.json): Version: 3.0.100-preview6-011799 Commit: 3816213dde

Runtime Environment: OS Name: Mac OS X OS Version: 10.14 OS Platform: Darwin RID: osx.10.14-x64 Base Path: /usr/local/share/dotnet/sdk/3.0.100-preview6-011799/

Host (useful for support): Version: 3.0.0-preview6-27707-07 Commit: c9e7f134dc

.NET Core SDKs installed: 3.0.100-preview6-011799 [/usr/local/share/dotnet/sdk]

.NET Core runtimes installed: Microsoft.AspNetCore.App 3.0.0-preview6-19257-04 [/usr/local/share/dotnet/shared/Microsoft.AspNetCore.App] Microsoft.NETCore.App 3.0.0-preview6-27707-07 [/usr/local/share/dotnet/shared/Microsoft.NETCore.App]

To install additional .NET Core runtimes or SDKs: https://aka.ms/dotnet-download VS Code version: 1.33.1 C# Extension version: 1.19 (v1.19.1)

Steps to reproduce

  1. Create a new ASP.NET Razor project by doing

    mkdir razor cd razor dotnet new razor

  2. Open razor with VScode

  3. It may ask at the bottom right to install assets to build and debug, say yes.

  4. After it has done this it will have created a .vscode directory in the ‘razor’ directory and a ‘launch.json’ file in that directory. Open the ‘.vscode’ directory, and double click on the ‘launch.json to edit it.

  5. Add the following lines after the “name” line of the “Configurations” object. (This allows debugging through the framework.

     "justMyCode": false,
     "symbolOptions": {
           "searchMicrosoftSymbolServer": true
     },
     "suppressJITOptimizations": true,
    
  6. Double click on the ‘Startup.cs’ file in the ‘Explorer’ pane to bring up that source code.

  7. Add the following line to the Startup.cs file at the beginning of the ‘Configure’ method (at the bottom of the file).
    Console.WriteLine("x " + 3);

  8. Place a breakpoint on that line (F9).

  9. Run the application until it hit that breakpoint (F5).

Expected behavior

It will load symbols from the Microsoft symbol server successfully.

Actual behavior

  1. Cannot find or open the PDB file image

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:1
  • Comments:5 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
gregg-miskellycommented, May 9, 2019
0reactions
gregg-miskellycommented, May 9, 2019

Nevermind. Found it.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Cannot find or open the PDB file - MSDN - Microsoft
Code runs OK in debug mode, when application stops. There are a lot of messages "Cannot find or open the PDB file." on...
Read more >
Cannot find or open the PDB file - Visual Studio Feedback
The Modules window states when looking at the path column, the PDB file is to be in “…\bin\x64\Debug\AppX” folder. Looking at the folder,...
Read more >
How to fix VS Community : Cannot Find or Open the PDB File
I'm using Visual Studio 2013. My problem is every time when i want to run my C/C++ codes using local windows debugger error...
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 >
Cannot find or open the PDB file Online Forums - OPC Labs
Hello, please explain the issue better. I do not understand where the error appears, under which conditions (are you running under debugger?
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