It would be great if it was possible to debug msbuild script. Step in, step out, see properties and values… Seems like there is a way to do it via VS2010 although unsupported. What needs to be done is:
- Ensure you debug “Just my code”:

- Enable undocumented "/debug" switch on MSBuild.exe by adding registry key HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\MSBuild\4.0 key to have debuggerenabled=true. Execute this in command prompt:
reg add HKLM\SOFTWARE\Microsoft\MSBuild\4.0 /v DebuggerEnabled /t REG_SZ /d true
- Check /debug switch:
MSBuild /?
- Run your build with /debug switch:
MSBuild MyCode.proj /debug
- Once you get standard JIT debugging prompt make sure you select "Manually choose the debugging engines".

- Select Managed mode only:

- Enjoy

Thanks to Visual Studio blog and Dan 
Also John Robins has a way to do it but I didn’t try it…