There are two ways to debug an Orchestration (or three if you use Diagnostics.Debug or other methods):
* Standard way via BizTalk Management Console (not described here), easy in use and gives a lot of information on the flow of your Orchestration and values of your messages and variables.
* But sometime you want more information on components/objects and then it is easier to use normal Visual Studio debugging.
When compiling a BizTalk Server 2009 project in Visual Studio classes (.cs) files are generated for the BizTalk artifcats. Those files are not part of the project and have the extension ‘.cs’, e.g.: .btp.cs, .xsd.cs, .btm.cs
I was expecting also a .odx.cs file, but that is not the case. The cs file for the Orchestration is placed in “obj\Debug\BizTalk\XLang” and is called File0.cs. If you open this file you can attach this file to your BizTalk process (where the Orchestration is hosted in) and of course place a breakpoint.
Thanks to Thiago Almeida who pointed me on this via Twitter.




