Neil Thompson

BizTalk | .NET | SQL |

  Home  |   Contact  |   Syndication    |   Login
  15 Posts | 20 Stories | 45 Comments | 55 Trackbacks

News

Article Categories

Archives

Post Categories

Fav BizTalk Blogs

Debugging BizTalk is pretty simple from within HAT.  See HAT BizTalk debugging for further info on that, it should be everywhere.  Things get only slightly more complicated when you want to debug a .NET component that is being invoked from an orchestration. 

If an orch is going to invoke a .NET component you first install the component to the GAC.  At runtime it will run within the BTSNTSvc.exe process.  So just open your .NET component, set your breakpoints and use Debug > Processes to attach to the BTSNTSvc process.

Now when you execute your orchestration, it will pause on your breakpoint when you get to the stage where the orchestration calls your component and you can step through as you normally would.

Make a script to automatically redeploy your orchestrations and components, if they are out-of-date, debugging will not work (I'll address how to create this script in another blog, but several solutions are “out there“ already if you take a look at some of the more prominent BizTalk blogs)

Caveats:

  1. Be sure that you build and redeploy your .NET component(s) AND your BTS assemblies before debugging, this is the #1 reason why debugging fails or gives unexpected results on step through
  2. SysInternal's DebugView does not catch trace messages when you attach to the BizTalk server process in this way, the output is intercepted by VS.net so look for your trace messages in the output window NOT in the DebugView console (This behaviour is by design and makes sense if you think about the message interception)
posted on Monday, June 13, 2005 4:35 PM

Feedback

# re: Debug BizTalk Server 2004 6/14/2005 11:54 AM nsthompson
One note for when you are working with the HAT orchestration debugger: Transactions affect your ability to set breakpoints, so if you can't set one check to see that you are not setting one in an atomic scope (or atomic orchestration)

# re: Debug BizTalk Server 2004 6/15/2005 10:49 AM nsthompson
Also remember that if you are using Atomic transactions, you might not have the history of the orchestration(s) available in the debugger.

I have set up a test case in which I have a long chain of orchestration being called in the context of an atomic transaction. An error occurs in the last one and when I open the instance in the Orchestration debugger the only history available is the last error message.

# re: Debug BizTalk Server 2004 10/24/2005 1:18 PM Bob
Is there anything else special you have to do for this to work? I have set a breakpoint in my C# component class, rebuilt the dll project with debug configuration, and my orchestration project with development configuration, but when I attach to the BTNTSvc process, Visual Studio tells me my breakpoint wont be reached because no symbols are loaded.

# re: Debug BizTalk Server 2004 10/24/2005 1:36 PM Bob
Nevermind, it appears I got it to work. Thanks for the good read!

# re: Debug BizTalk Server 2004 10/25/2005 7:08 AM Neil
thanks for the feedback Bob, would I be correct in assuming that you had omitted the redeploy step for your .net component and BizTalk assemblies and that was solution to the issue?

# re: Debug BizTalk Server 2004 11/11/2005 1:01 PM Bob
Sorry for the long reply time. I'm busy busy, heh! Yea, I forogt to redeploy with the development orchestration.

# re: Debug BizTalk Server 2004 11/11/2005 1:01 PM Bob
Not development orchestration, debug build of .NET component I meant.

Post A Comment
Title:
Name:
Email:
Website:
Comment:
Verification: