Ticket #2124 (closed enhancement: fixed)

Opened 3 years ago

Last modified 3 years ago

Support msDebug() output to Windows OutputDebugString

Reported by: dmorissette Assigned to: dmorissette
Priority: normal Milestone: 5.0 release
Component: MapServer C Library Version: 5.0
Severity: normal Keywords:
Cc: tamas

Description

While discussing MS RFC 28, Tamas suggested that we also include support for Windows OutputDebugString?():

Tamas Szekeres wrote:

It would be pretty useful to support the Windows OutputDebugString? API as well. That would make the life of the Windows developers much easier and establish the ability to use external programs like SysInternals? debugview to display the debug output. (I think there have been some issues in the -users list in this question before) For using this function <windows.h> should be included which have already included in many places in the code.

This option could be trigerred by setting MS_ERRORFILE to "windowsdebug". He also provided the following example showing how to use the function:

You should simply call the non unicode variant, like:

#ifdef WIN32
#include <windows.h>

void writeDebug( const char * pszMessage)
{
   OutputDebugStringA(pszMessage);
}
#endif

For more info http://msdn2.microsoft.com/en-us/library/aa363362.aspx

Change History

07/06/07 18:43:12 changed by dmorissette

  • cc set to tamas.
  • status changed from new to assigned.
  • version set to 5.0.
  • milestone set to 5.0 release.

This is implemented in r6271 but not tested.

Tamas, can you please test and report whether the MS_ERRORFILE "windowsdebug" option works as expected on Windows?

07/07/07 16:45:22 changed by tamas

Yes, it works for me pretty well.

07/08/07 16:44:04 changed by dmorissette

  • status changed from assigned to closed.
  • resolution set to fixed.

Excellent! Marking fixed then.