Debugging Nant Build scripts in VS 2005

buildnantxslt

HI,
We are using NANT build scripts in our project. The scenario is as follows, In my Application I create an application( this is basically UI based, the user drags, drops widgets etc, these are stored as xml internally). then while I say Build application, we use NANT scripts to call XSLT transform, I do not know if it is possible to debug the NANT scrips and the XSLTs called from NANT script in VS or some other debugging tool, Can anybody suggest a way to debug this.

Thanks,
Sid

Best Answer

There are some nAnt debugging tools out there, some of them you have to buy and some are free, or free for limited uses. NAntBuilder is one example, but that did not work very well for my multi-file build scripts.

I have always had success by adding tasks to print out what is going on. Admittedly this is old-school and crude, but it does get the job done :-)

For your specific debugging requirement, you could copy out the XML to a file at the time when the transform will run with a copy or echo task (dpending if the XML is in a variable or in a file), and then debug the XSL tranform manually using something like XML Spy or Oxygen XML editor.

HTH Joon