Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

"Cannot find or open the PDB file" from Visual Studio 2013 RC

First time user of C#, but I have experience with Java.

I wrote a Hello World program to initiate myself, but I have been getting this cannot find or open the PDB file error when compiling.

'ConsoleApplication4.vshost.exe' (CLR v2.0.50727: ConsoleApplication4.vshost.exe): Loaded 'C:\Windows\assembly\GAC_64\mscorlib\2.0.0.0__b77a5c561934e089\mscorlib.dll'. Cannot find or open the PDB file.
'ConsoleApplication4.vshost.exe' (CLR v2.0.50727: ConsoleApplication4.vshost.exe): Loaded 'C:\Windows\assembly\GAC_MSIL\Microsoft.VisualStudio.HostingProcess.Utilities\12.0.0.0__b03f5f7f11d50a3a\Microsoft.VisualStudio.HostingProcess.Utilities.dll'. Cannot find or open the PDB file.
'ConsoleApplication4.vshost.exe' (CLR v2.0.50727: ConsoleApplication4.vshost.exe): Loaded 'C:\Windows\assembly\GAC_MSIL\System.Windows.Forms\2.0.0.0__b77a5c561934e089\System.Windows.Forms.dll'. Cannot find or open the PDB file.
'ConsoleApplication4.vshost.exe' (CLR v2.0.50727: ConsoleApplication4.vshost.exe): Loaded 'C:\Windows\assembly\GAC_MSIL\System\2.0.0.0__b77a5c561934e089\System.dll'. Cannot find or open the PDB file.
'ConsoleApplication4.vshost.exe' (CLR v2.0.50727: ConsoleApplication4.vshost.exe): Loaded 'C:\Windows\assembly\GAC_MSIL\System.Drawing\2.0.0.0__b03f5f7f11d50a3a\System.Drawing.dll'. Cannot find or open the PDB file.
'ConsoleApplication4.vshost.exe' (CLR v2.0.50727: ConsoleApplication4.vshost.exe): Loaded 'C:\Windows\assembly\GAC_MSIL\Microsoft.VisualStudio.HostingProcess.Utilities.Sync\12.0.0.0__b03f5f7f11d50a3a\Microsoft.VisualStudio.HostingProcess.Utilities.Sync.dll'. Cannot find or open the PDB file.
'ConsoleApplication4.vshost.exe' (CLR v2.0.50727: ConsoleApplication4.vshost.exe): Loaded 'C:\Windows\assembly\GAC_MSIL\Microsoft.VisualStudio.Debugger.Runtime\12.0.0.0__b03f5f7f11d50a3a\Microsoft.VisualStudio.Debugger.Runtime.dll'. 
'ConsoleApplication4.vshost.exe' (CLR v2.0.50727: ConsoleApplication4.vshost.exe): Loaded 'c:\users\520\documents\visual studio 2013\Projects\ConsoleApplication4\ConsoleApplication4\bin\Debug\ConsoleApplication4.vshost.exe'. Cannot find or open the PDB file.
'ConsoleApplication4.vshost.exe' (CLR v2.0.50727: ConsoleApplication4.vshost.exe): Loaded 'C:\Windows\assembly\GAC_64\System.Data\2.0.0.0__b77a5c561934e089\System.Data.dll'. Cannot find or open the PDB file.
'ConsoleApplication4.vshost.exe' (CLR v2.0.50727: ConsoleApplication4.vshost.exe): Loaded 'C:\Windows\assembly\GAC_MSIL\System.Xml\2.0.0.0__b77a5c561934e089\System.Xml.dll'. Cannot find or open the PDB file.
'ConsoleApplication4.vshost.exe' (CLR v2.0.50727: ConsoleApplication4.vshost.exe): Loaded 'C:\Windows\assembly\GAC_MSIL\System.Drawing.Design\2.0.0.0__b03f5f7f11d50a3a\System.Drawing.Design.dll'. Cannot find or open the PDB file.
The thread 0xa14 has exited with code 259 (0x103).
The thread 0x235c has exited with code 259 (0x103).
'ConsoleApplication4.vshost.exe' (CLR v2.0.50727: ConsoleApplication4.vshost.exe): Loaded 'c:\users\520\documents\visual studio 2013\Projects\ConsoleApplication4\ConsoleApplication4\bin\Debug\ConsoleApplication4.exe'. Symbols loaded.
The thread 0x25b8 has exited with code 259 (0x103).
The thread 0x9d0 has exited with code 259 (0x103).
The program '[8756] ConsoleApplication4.vshost.exe' has exited with code 0 (0x0).
The program '[8756] ConsoleApplication4.vshost.exe: Program Trace' has exited with code 0 (0x0).

What could be the issue?

like image 289
theGreenCabbage Avatar asked Nov 19 '13 21:11

theGreenCabbage


People also ask

Why my PDB file is not opening?

If you see a message stating that Visual Studio cannot find or open the PDB file, try using Visual Studio's debugging tool. Go to Tools > Options > Debugging > Symbols and select Microsoft Symbol Servers.

How do I open PDB files in Visual Studio?

In Visual Studio, open Tools > Options > Debugging > Symbols (or Debug > Options > Symbols).

How do I create a PDB file in Visual Studio 2013?

Export the function to a DLL. Set the DLL project to generate new PDB files for each build. Compile and building all projects. Start your program without debugging (CTRL+F5).

What application opens PDB file?

A PDB file is a database file used by various applications, including Pegasus, Quicken, Microsoft Visual Studio, and Palm Pilot software. It stores data in a structured format and is typically installed with the corresponding application.


1 Answers

What matters the most is fine, the symbols for your own code could be loaded: ...ConsoleApplication4.exe'. Symbols loaded.

The rest of the missing symbols are for the .NET system's assemblies (dlls). They are not needed all the time, you can debug your code without them, but if you do advanced things like messaging, majority of your stack won't be able to be unrolled (or sometimes it's called "symbolicated").

I prefer to have as much system pdbs (debug symbol files) as possible. It's very easy to setup with VS 2012, I assume that VS 2013 is just as easy or even better. http://msdn.microsoft.com/en-us/library/b8ttk8zy%28v=vs.90%29.aspx

Note, that after setting up symbol downloading you'll experience major delay the first time you'll debug your code. That's when the symbol downloading happens. Once that's done starting debug will be fast again (because new symbols are only needed if the .NET system gets some updates which affects your assemblies too).

I also install "Debugging Tools for Windows xy" and "Windows xy SDK" too (where xy=7, 8, 8.1, 10 depending on which Windows you are using, plus the architecture matters too: X64 or 32), even if I only debug managed (that's the term for programs written in .NET garbage collected and handled languages) code. http://msdn.microsoft.com/en-us/library/windows/hardware/ff551063%28v=vs.85%29.aspx

One assembly you may not get symbol for is the ConsoleApplication4.vshost.exe. That's a stub what Visual Studio debugger uses to start your program. You can see it in the Process Explorer (Sysinternals Tools suite), sometimes more instances are lingering around.

like image 86
Csaba Toth Avatar answered Oct 07 '22 17:10

Csaba Toth