Miscellaneous Debris

Avner Kashtan's Frustrations and Exultations
Visual Studio obstructing DebugView

I've mentioned it before, but SysInternal's DebugView is a great utility. It allows you to get the Debug.WriteLine() strings from your application even when you're not attached with a debugger, as long as it was compiled in Debug mode. Very convenient.

Unfortunately, it's a bit hard to use when I'm also actually doing work with Visual Studio. It seems that some bits of VS are also logging calls with the OutputDebugString API call. I can live with the occasional message like this:

[3448] DllCanUnloadNow called for VSA7.dll
[3448] DllCanUnloadNow returned S_FALSE

but getting these:

[3448] Left. Enter HWND 90ea6

whenever I do anything in Visual Studio is annoying, and quickly hides any pertinent debug messages I want to see.

Running  Microsoft Visual Studio 2005 Team Edition for Software Developers
Version 8.0.50727.51  (QFE.050727-5100)
Microsoft .NET Framework
Version 2.0.50727

Published Tuesday, June 20, 2006 10:43 AM by AvnerK

Filed under: ,

Comments

# re: Visual Studio obstructing DebugView@ Tuesday, June 20, 2006 5:41 AM

If there are no Trace listeners attached the default is to send any Trace.WriteLine type output using OutputDebugString - see http://www.thecodeproject.com/vb/net/VisualTraceListener.asp

merrion

# Interesting Finds: June 20, 2006 AM edition@ Tuesday, June 20, 2006 10:40 AM

Jason Haley

# re: Visual Studio obstructing DebugView@ Tuesday, June 20, 2006 11:25 AM

That's what filters are for.  Just set it to exclude 3448 or whatever all the VS debug lines start with.

My UPS software does the same thing, so i either have to set up filters, or unplug the USB interface and lose my auto hibernate and auto shutdown ability that the UPS can trigger.

Chris

# re: Visual Studio obstructing DebugView@ Tuesday, June 20, 2006 12:12 PM

I can always filter, but since the 3448 is the Process ID for the current instance, it changes every time I run Visual Studio. This means I can either redefine the filter every time or try to guess all the possible messages and filter them out.

AvnerK

# re: Visual Studio obstructing DebugView@ Tuesday, June 20, 2006 2:52 PM

I was wondering when somebody else would notice this. It's been driving me nuts for a while.

http://mcfunley.com/cs/blogs/dan/archive/2006/03/30/978.aspx

Dan McKinley

# re: Visual Studio obstructing DebugView@ Monday, August 28, 2006 8:00 AM

I tracked that down: it's actually caused by the latest Visual Source Safe addin: ssscc.dll

I searched that dll for the offending text "Left, Enter HWND" and replaced the first character of that text in the dll with a null byte. So OutputDebugString will just output an empty string which is not appearing in my DebugView.

Now I have silence in debugview again until my OutputDebugStrings are executed.

HTH,

SvenC

SvenC

# re: Visual Studio obstructing DebugView@ Sunday, November 19, 2006 7:20 PM

Just setup a filter in Debug View. In the exclude textbox type "Enter HWND" without the double quotes. Problem solved.

Jake Scott

Leave a Comment

(required) 
(required) 
(optional)
(required)