Home Page › Forums › BizTalk 2004 – BizTalk 2010 › Debugging inside the Orchestration
- This topic has 4 replies, 1 voice, and was last updated 6 years, 10 months ago by
community-content.
-
AuthorPosts
-
-
April 10, 2006 at 9:45 AM #13320
Hi,
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,
fred -
April 11, 2006 at 4:22 AM #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,
Fred-
April 11, 2006 at 2:08 AM #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
[url]http://www.traceofthought.net/PermaLink,guid,62b858b4-d8ba-4fc4-92aa-35a4ff1ba00a.aspx[/url]-
April 11, 2006 at 7:46 AM #13323
You will need to check out the System.Diagnostics.Trace/Debug options.
These can be controlled via config file switches
-
April 11, 2006 at 2:41 PM #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
http://Biztalk-Training.com
-
-
-
-
-
AuthorPosts
- The forum ‘BizTalk 2004 – BizTalk 2010’ is closed to new topics and replies.