I\'ve recently migrated a lot of manual precondition testing and exception throwing with code contracts. Instead of upgrading to .NET 4, I\'ve been using the Microsoft
I hope you know what contract rewriting means—extra code generated on the fly which doesn't have any source code for compiler to latch on. With CLR having so many different elements, there's quite a number of things that debugger either won't do at all or will get confused and only things which are full blown language features with wide impact get the budget for complete debugger support. Like lambda expressions for example.
Which is not to say that filing a bug is not for a good cause, just that you shouldn't expect anything to turn better when you are using an aspect which is not even fully developed yet. Being early adopter always has that kind of cost, but also the bragging rights :-)
have in mind, that the code contracts currently do not work with Post conditions & multithreading. limit the contracts to do only Precondition rewriting. that solved a lot of issues in our system.