This is plain strange in that case. I just did a quick test and I can't reproduce this at all (in VWD of course).
Can you give a bit more detail; where exactly are you running the above code? Is it in a Razor view?
There shouldn't really be any way that Orchard could mess the debugger up like this.
Some things you could try:
- Attempt the same debug in an empty MVC 3 application (if you haven't already)
- Install VWD 2010 and see if you get the same problem
- Update to latest Orchard 1.1 (if you haven't already) and see if it's still happening
- Set up a new "clean" Orchard 1.1 instance from default branch, with no additional modules at all, and see if it still happens
- Reformat and reinstall your computer. I know this is an extreme step but failing everything else, there is clearly
something corrupted or screwy going on, and without knowing where it is it's hard to say whether just reinstalling VS or clearing all its settings and related registry entries would fix the problem. But reformatting will ensure that you are working
on a "blank slate" and it's just a good thing to do now and then; I usually notice a big speed boost whenever I do so in any case. Obviously I won't recommend you do this until you've exhausted all other possibilities, but sometimes it's actually the simplest
thing - especially if your installation is a few years old.