This was driving me nuts.
I have a site with mixed code, .asp (vbscript) and .Net (c#) and I wanted to be able to debug the .Net pages to see what’s going on when intended functionality fails.
So I ran a fresh build, set breakpoint in my code, started up IIS Express to run my local dev copy of the site, opened Visual Studio 2008 and went to Debug > Attach To Process, picked IISExpress.exe and tested my .aspx page… and never hit the breakpoint.
It wasn’t program flow – there was no way this code wasn’t being run – I could see the results of it on the page.
Finally at last, 3 pages into a forum post from a German site, I found advice to right-click the project, choose Clean, then do another Build- and that worked. But I didn’t find that “Clean” advice anywhere else for 2 days – just instructions on how to set up debugging in IIS Express that didn’t seem to work.
So there. Documented.