BizTalk Orchestration – Orchestration debugging inside Visual Studio – Part II (BizTalk 2009)

  • Sandro Pereira
  • Sep 11, 2009
  • 2 min read

Debugging orchestrations is often cited as one of the most challenging aspects of BizTalk development. This post provides the essential roadmap for developers to move from “guessing” to “knowing” by utilizing the Visual Studio debugger effectively.

In my previous post, BizTalk Orchestration – Orchestration debugging inside Visual Studio, I explained how to debug BizTalk 2004, 2006, or R2 orchestration in Visual Studio.

📝 One-Minute Brief

BizTalk 2009 streamlined the orchestration debugging process by improving integration with Visual Studio. This guide explores the “Part II” of orchestration debugging, focusing on the ability to set breakpoints more reliably, the improved visibility of message context properties during runtime, and how to effectively use the Locals window to inspect XLANG/s variables. It is an essential read for developers moving from legacy BizTalk environments to modern (at the time) 2009/2010 standards.

So, how can I do this in BizTalk 2009 version?

When compiling a BizTalk Server 2009 project in Visual Studio classes (.cs) files are generated for the BizTalk artifacts. 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 “objDebugBizTalkXLang” and is called File0.cs. If you open this file, you can attach this file to your BizTalk process (where the Orchestration is hosted) and, of course, place a breakpoint.

BizTalk Orchestration debugging inside Visual Studio

Another difference is that if we have more than one orchestration when we compile the solution, Visual Studio DON’T generate two CS files (File0.cs and File1.cs), it only generates one, and the code of the two (or more) orchestrations is inside the file: File0.cs

Inside this file, he creates different classes according to the orchestration Typename property, sample:

  • sealed internal class BizTalk_Orchestration1: Microsoft.BizTalk.XLANGs.BTXEngine.BTXService …
  • sealed internal class BizTalk_Orchestration2: Microsoft.BizTalk.XLANGs.BTXEngine.BTXService…

References:

Thanks for Buying me a coffe
Author: Sandro Pereira

Sandro Pereira lives in Portugal and works as a consultant at DevScope. In the past years, he has been working on implementing Integration scenarios both on-premises and cloud for various clients, each with different scenarios from a technical point of view, size, and criticality, using Microsoft Azure, Microsoft BizTalk Server and different technologies like AS2, EDI, RosettaNet, SAP, TIBCO etc. He is a regular blogger, international speaker, and technical reviewer of several BizTalk books all focused on Integration. He is also the author of the book “BizTalk Mapping Patterns & Best Practices”. He has been awarded MVP since 2011 for his contributions to the integration community.

1 thought on “BizTalk Orchestration – Orchestration debugging inside Visual Studio – Part II (BizTalk 2009)”

  1. I am new to Biztalk.
    My question is :

    Can you please provide me the steps to debug orchestraion in 2010 ?
    Is it possible to check the data present in each shape used in the orchestraions at run time ? (Like, In dot net we have quick watch which allows us to check values while debugging)

    Any suggestions and links would be of great help!!! Thanks .

Leave a Reply

Your email address will not be published. Required fields are marked *

The Ultimate Cloud
Management Platform for Azure

Supercharge your Azure Cost Saving

Learn More
Turbo360 Widget

Back to Top