Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to include pdb files in MSI installer to deploy along side the rest of the app?

How to include pdb files in MSI installer to deploy along side the rest of the app?

I want to keep the line numbers and full stack trace in error logs we generate.

Update

The line numbers of the code are not reported in the stacktrace unless you distribute the pdb's, I've tested this.

How can when I build the MSI and I've asked the MSI installer project to include various project outputs (about 5) to also include the pdb's of those project outputs in the MSI? or how to get this information (code line numbers) from the Exception ex into the logs?

like image 692
m3ntat Avatar asked Dec 03 '09 17:12

m3ntat


People also ask

Where do I put PDB files?

pdb file stores all debug information for the project's .exe file, and resides in the \debug subdirectory. The <project>. pdb file contains full debug information, including function prototypes, not just the type information found in VC<x>. pdb.

Is PDB file required for deployment?

No, you don't have to deploy the . pdb file. To quote from MSDN, "A PDB file is created when you build with /debug (Visual Basic/C#).", so it shouldn't be creating the debug database when compiling for release.

How do I load a PDB symbol?

Open Settings: Tools->Options -> Debugging -> Symbols and add directory, where your . PDB files are located. You can add custom path, like for each project, and also you can edit common path, where Visual Studio will save all .


2 Answers

For a Visual Studio Deployment Project you should do:

Add -> Project Output -> Debug Symbols

Also make sure that the *.pdb generation is enabled in each project Build configuration.

like image 164
João Angelo Avatar answered Sep 18 '22 08:09

João Angelo


I know this is a little late to the OP, but I found that the previous answer needed more clarification (at least for me). For VS2010, when you click Add -> Project Output -> Debug symbols, you need to specify the project in the drop down, and then ctrl+click the "Debug Symbols" for that project. Do this for all the projects that you have, which will entail you clicking Add -> Project Output -> Debug Symbols each time.

like image 34
terryg Avatar answered Sep 22 '22 08:09

terryg