See here for more info: How can I debug (preferably in an IDE) an MSBuild script?
MsBuild is declarative. Sure the many tasks it has a imperative code but without the sources you can't debug them easily.
What I used to do was set the verbosity level to diagnostic so that it showed what it thinks it was doing.
Was quite easy once you understand it's rules such items, property and expression evaluation rules.
It's better to think of MsBuild as a data flow not as control flow. You have some source data, items, expressions, properties and this transformed into the output data set. Just like in SQL you specify what you want and not how to do it - MsBuild is the same.
Having said all that : I just found this hidden debugger thing :-)