BizTalk - How to debug map in VS2005

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.
               Sample Map

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

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.
            debugging   
            
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).
             output

What do you see? It is really cool, isn’t it?
Enjoy!
posted @ 2008-05-09 21:36  zhanqiangz(闲云野鹤)  阅读(1633)  评论(4编辑  收藏  举报