Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I get the "Publish Website" command to emit PDB files for my Visual Studio 2005 Web Site project?

Tags:

I have a VS 2005 Web Site project (not the web application project model, the 'web site' project model) and I want to be able to include the PDB files for the page assemblies in the bin folder via the "Publish Website" command within Visual Studio to help out with debugging an issue.

No matter what I try with regard to the "Debug/Release" mode settings, I can't seem to get PDB files for the website assemblies to show up in the 'bin' folder once I've published the site. I do get them for any externally references assemblies, but not for the actual website code-behind assemblies, which is what I need.

How do I get Visual Studio to include these files when publishing using the web site project model?

like image 413
Jesse Taber Avatar asked May 11 '09 18:05

Jesse Taber


People also ask

How do I use PDB files in Visual Studio?

The easiest way to use the PDB file is to let Visual Studio do the heavy lifting - either launch your program with Visual Studio's "Debug" command (F5 by default), or run the program and use the "Attach to Process" item in Visual Studio's Debug menu.

Why is there a PDB files in release folder?

PDB files help you and the debugger out, making post-mortem debugging significantly easier. You make the point that if your software is ready for release, you should have done all your debugging by then.


1 Answers

The Publish command always compiles your project for release and I haven't found a way to cause the pdb files to be generated during the precompile.

There is a workaround I have tried. If when you precompile you check the box "Allow this precompiled site to be updatable" and then update the web site in place this results in a dynamic compilation. The dynamic compilation should produce debug code and pdb files if your web.config settings has:

 <compilation defaultLanguage="your language" debug="true" />

Here is a good blog post about the different publish options.

like image 150
Gary.Ray Avatar answered Oct 11 '22 17:10

Gary.Ray