We use MSBuild quite extensively as part of our continuous integration process, and whilst it is incredibly powerful and we can do practically all of our build, test and deploym
You can step through MSBuild scripts in Visual Studio if you are using MSBuild 4.0 or higher.
It's a simple registry change and then a /debug switch when running MSBuild.
See here for a complete walkthrough: http://blogs.msdn.com/b/visualstudio/archive/2010/07/06/debugging-msbuild-script-with-visual-studio.aspx