Can't see Debug statements in DebugView?

Posted at: 5/24/2007 at 6:49 AM by saravana

First of all to see debug statements inside DebugView you need to compile your assemblies in "Debug" mode. For optimization reasons if you compile your assemblies in "Release" mode all the System.Diagnostics.Debug.WriteLine statements will be ignored by the compiler and you won't see any output in the DebugView.

When it comes to BizTalk project sometimes even though the tool bar will say the build is "Debug" as shown in the figure

 

When you actually look into the properties of the BizTalk project it may be configured for "Deployment", which is equivalent to the "Release" build and it won't emit any debug symbols.

So, in this case you need to set the configuration to "Development", which is equivalent to "Debug" build.

Nandri!

Saravana

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5
Tags: |  Categories: .NET | BizTalk General
Actions: Email this article Email | Kick it! | DZone it! | Save to del.icio.us | Technorati Links
Post Information: Permanent LinkPermalink | CommentsComments(3) | Comments RSS

Comments

Thursday, May 24, 2007 5:45 PM
Richard
Hi Saravana!

First I have to say I'm impressed of your blog posting ratio as well as the number of post on the newsgroups. Keep it up! It helped me a number of times!

I just wanna add that when using DebugView via remote desktop one has to log in using the console user (mstsc -v:servername /F -console).

I guess this makes sense in away but I'd like a more technical explanation ... Have you experienced the same and if so could you explain it?
Thursday, May 24, 2007 9:07 PM
Saravana Kumar
Hi Richard, We experienced similar problems in the past. If I remember correctly enabling "Capter win32" and "Capture kernel" options will enable debug statements to appear in debugview. I'm not an windows internal expert, I guess the debug infrastrucuture (especially kernel mode DbgPrint) works on the basis of subscription. There can be only one subscriber. When you connect using -console command, that's literally equivalent to staying infront of the physical machine.

Saravana
Friday, June 08, 2007 2:35 PM
Anonymous
Anonymous
Hi! Nice blog. Just wanted to let you know that if you use System.Diagnostics.Trace.WriteLine instead of System.Diagnostics.Debug.Writeline, the output will always appear in debugview, regardless of whether it is a debug or release build.

Add comment


(Will show your Gravatar icon)  

  Country flag

biuquote
  • Comment
  • Preview
Loading