Windows 2008 r2 debugview (OutputDebugString) issue

permissionswindows-server-2008

Hi we are installing x86 application as a service on windows 2008 R2 which is using OutputDebugString for debug messages.

The problem is that DebugView utility catches the debug output from the application only when application is run from console in elevated mode and not as a service.

I haven't found any KB that talks directly about this limitation of OutputDebugString in windows 2008 R2.

Anyone encountered such a problem? Is there such limitation really exists?

UPD: We are using terminal services to connect to server if that important

Best Answer

UPDATE: This seems to be a fix for the issue Its a special kernel mode driver that creates the mutex correctly.

Windows Debuggers and OutputDebugString uses a mutex, a shared memory buffer and two events to pass the messages back and forth. It seems that sometimes a permission error can occur when trying to read the messages. Perhaps this is happening when writing the messages.

I would think that profiling the application with dependency walker would be the best way to find the CreateMutex call short of stepping through the disassembly with WinDbg.

Related Topic