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?
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.
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.
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With