It’s not immediately obvious how you can debug code in BizTalk orchestrations, custom pipelines, custom fuctoids etc. After investigating a couple of options I found the easiest way is to use a tool called Debugview which is a simple executable (no installation required) supplied by Microsoft for free.
- Download the executable and install it on the desktop or somewhere else thats easy to get to
- In an orchestration enter the following code in either a Message Assignment or Expression shape with whatever you want to
System.Diagnostics.Trace.WriteLine(System.String.Format("Message content is - {0}",msgMyEmployees.OuterXml));
- Or in c# you can write the same code in your custom functoid or custom pipeline
- Deploy / GAC / Restart host instances as usual then kick off DbgView.exe .
- Ensure Capture Win32 Capture Global Win32 are all checked under the capture menu
- Click on Capture (the magnifying glass)
- Run your test case through BizTalk and the output will be printed to the window. Nice and easy.