The reason for this turned out to be that I had inadvertently published my WebSite. A published website does not generate pdb symbols on build and hence cannot be debugged.
(NB: I only admit this publicly to save you the same embarrasment – so stop laughing and send money 🙂 )
How Can I Tell If My WebSite is Published ?
It will have a PrecompiledApp.config associated with it. You will also find the Project folder for your site your site find has a sub-folder called PrecompiledWeb which contains an ‘appname’ folder which itself contains PrecompliedApp.config. e.g. Let’s say your Web Project is called “DogFood”. Your precompiled web site will have the following folder structure under ‘Visual Studio 2005’
- Visual Studio 2005/Projects/DogFood
- Visual Studio 2005/Projects/DogFood/PrecompiledWeb/DogFood
This post, “Why The Debugger Will Not Hit Your Breakpoints” on MSDN Blogs caused the necessary neurons to fire.
Keep Out Of The Reach Of Children
How did the web site accidently get published ? Well…err… it appears that SOME MANIAC COMPLETELY UNBEKNOWNST TO ME right-clicked on the web site project in Solution Explorer and selected ‘Publish Web Site’. Simple, quick and deadly. It should have a skull and crossbones icon on it, or be marked ‘don’t click under any circumstances’ or something…
How To Unpublish Your Web Site
I don’t think you can. But you can apparaently force a published Web Site to build with debug symbols using aspnet_compiler -d from a Visual Studio command prompt. See the post cited above for details.
Tags: Publish Web Site