We’ve all been there: an orchestration is suspended, and the error message is too generic to be helpful. While the BizTalk Admin Console is great for overview tracking, HAT it’s great for visual debug orchestration and see the track of the workflow, but there are some situations that we wish to could step through orchestration shapes in Visual Studio and see what’s real appends inside the shapes, especially in expression shapes and message assign shapes. True “line-by-line” debugging happens inside Visual Studio. Why is it so difficult to do with BizTalk projects?
Here is how to set it up correctly.
📝 One-Minute Brief
While the BizTalk Administration Console offers the Group Hub for tracking, sometimes you need the deep-level precision of the Visual Studio Debugger. This post explains how to attach the Visual Studio debugger to the BTSNTSvc.exe process, set breakpoints within your XLANG/s shapes, and inspect variables in real-time. It’s the definitive guide to moving beyond Event Log debugging and mastering runtime orchestration analysis.
So how can I do this?
- Go to Regedit.
- Add a registry key named BizTalkProject at [HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\8.0]
(if you are using BizTalk 2004 and Visual Studio .NET 2003 is HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\7.1) - Next, create a DWORD value named GenerateCSFile and set it to 1
- Setting the Generate Debugging Information = True property by right-clicking on the project in Visual Studio and selecting Properties → Configuration Properties → Build will ensure that the C# files are created for debug builds in BizTalk 2006.
- If you rebuild your project, you will see C# files in your project directory (Click show hidden files, and you should see a file named <OrchestrationName>.odx..cs);
Now we can add breakpoints in code inside expression shapes or message assign shapes. To get into debug mode, simply attach Visual Studio to the BTSNTSVC.exe process.
Surprisingly, not too many people are familiar with it.
I hope that in the next versions of the product, this feature will become easier to accomplish, in other words, with a special highlight inside Visual Studio.

I think with R2 and 2009, the odx.cs file is generated by default.
Atin,You are correct, in 2006 R2, the “.odx.cs” file is generate by default (in the same directory that the “.odx” file)BizTalk 2009 the behavior is a little different, the CS file for the Orchestration is placed in “objDebugBizTalkXLang” and is called File0.cs. (see http://sandroasp.spaces.live.com/blog/cns!98A008F39B7BBF8E!319.entry)