Debugging inside the Orchestration

Home Page Forums BizTalk 2004 – BizTalk 2010 Debugging inside the Orchestration

Viewing 1 reply thread
  • Author
    • #13320


      I have this situation…I want to debug variables in the orchestration. Currently I am using System.Diagnostics.EventLog.WriteEntry. However I want to use the EventLog.WriteEntry() only when I am in Development Mode (As I recall, Biztalk Projects don’t have Debug mode.). I tried using #IF DEBUG <do something> #ENDIF. It seems that it didn’t work. Was there anything that I forgot to do?

      Are there any better ways on Debugging inside the Orchestration? If there are any questions, please let me know.

      Thanks in advance,

    • #13321

      Hi Greg,

      Thanks for your reply, but as much as possible what I want is that I would not have to download any tools for it. We would just use what .NET or Biztalk has for debugging. Is there any other way on debugging it without any tools?

      Basically what I would like to have is to turn on the code \”System.Diagnostics.EventLog.WriteEntry\” when the proejct is set to Development mode and turn it off if when the project is set to Deployment mode.

      Thanks again,

      • #13322

        The code in an orchestration is not C# it’s XLANG, so C# compiler directives will have no effect.

        You might like to check out log4net

        • #13323

          You will need to check out the System.Diagnostics.Trace/Debug options.

          These can be controlled via config file switches

          • #13324

            The #if ain’t gonna work!

            We have a debug flag in the Biztalk config file
            \”c:\\Program Files\\Microsoft BizTalk Server 2004\\BTSNTSvc.exe.config\”.

            Then do something like this:
            blnTraceFlag = System.Convert.ToBoolean(System.Configuration.ConfigurationSettings.AppSettings.Get(\”MyProject.MyOrchName.TraceFlag\”));

            An if statement like this will work in expression shapes, but unfortunately not Message Assignment shapes.

            if(blnTraceFlag == true){

            // put your trace logic here.


            Neal Walters

Viewing 1 reply thread
  • The forum ‘BizTalk 2004 – BizTalk 2010’ is closed to new topics and replies.