I am here not talking about debugging BizTalk application with HAT, my topic is how to debug map in VS2005. Is it a new topic? I hope so. :)

1. Why is it possible to debug BizTalk map in VS2005?
    1). VS2005 enables you to debug XSLT (It might be a new feature coming with VS2005, I am not sure whether VS2003 has this feature.)
    2).  BizTalk map is essentially a XSLT file.

2. Are  you ready? the exciting journey begins here...
1). Generate XSLT file based on physical map. We will use the sample code which is for previous topic.
               BizTalk -  How to debug map in VS2005

 2).    Open your explorer, right click on the map file and select validate map.
        BizTalk -  How to debug map in VS2005
3). In the output window, you can see the xsl file is generated.
          BizTalk -  How to debug map in VS2005
4). Press Ctrl and click the file path to open it.
           BizTalk -  How to debug map in VS2005
5). Now you CANNOT find any menu regarding XSLT/Map debugging. Do not worry!  Right click on the document and select View Source.
          BizTalk -  How to debug map in VS2005
6). A window pops up (shown as below), click Yes to continue.
           BizTalk -  How to debug map in VS2005
7). Click anywhere on the document and see what have been changed on the menu bar.
            BizTalk -  How to debug map in VS2005
          It’s true, you found Debug XSLT menu item. Before debugging let’s put some breakpoints here.
             BizTalk -  How to debug map in VS2005

8).  Just click it…another window will pop up to ask you specify a input file instance before debugging and continue to debug. As you can see watch window, command/immediate window now is available for you keep tracking variables, you can press F10 to step forward.
            BizTalk -  How to debug map in VS2005   
            
9). In the right hand window, you can see the output (tips: you can press Ctrl+K+D to format the output file to make it more readable).
             BizTalk -  How to debug map in VS2005

What do you see? It is really cool, isn’t it?
Enjoy!

相关文章: