no OutpuDebugString output ?

  • Thread starter Thread starter Pavel
  • Start date Start date
P

Pavel

Hi All,

It looks like VS.Net does not display messages from
OutputDebugString while debugging managed code. Is it
right? Afraid so, or calls to this would work:

[DllImport("kernel32.dll")]
extern static void OutputDebugString(String str);

Anyway, I would love to be able to see debug messages from
my native dll (wrapped into MC++) while debugging that
dll's C# client. Any thoughts on how to achieve this
without changing every single call to the
OutputDebugString to something else?

Regards,
Pavel.
 
Pavel said:
Hi All,

It looks like VS.Net does not display messages from
OutputDebugString while debugging managed code. Is it
right? Afraid so, or calls to this would work:

[DllImport("kernel32.dll")]
extern static void OutputDebugString(String str);

Anyway, I would love to be able to see debug messages from
my native dll (wrapped into MC++) while debugging that
dll's C# client. Any thoughts on how to achieve this
without changing every single call to the
OutputDebugString to something else?

I can't comment on whether the VS IDE shows OutputDebugString messages when
debugging managed code (sure seems like it ought to!). However, one option
you might be able to use is something like DebugView from SysInternals
(http://www.sysinternals.com/ntw2k/freeware/debugview.shtml).

-cd
 
Yeah, I thought it 'ought to' as well :(. But now, looking
at documentation for DefaultTraceListener that "emit the
message to the OutputDebugString *and* to the
Debugger.Log", it surely looks like it must not. Otherwise
there would be duplicate messages in the Output Debug
window.

I wonder, what forced MS to introduce implementation of
the Debugger.Log different then a simple call to
OutputDebugString?

I knew about DebugView and was always wondering why people
use it when all you need is a debugger. Now I guess I
will have to start using it as well.

Regards,
Pavel.

-----Original Message-----
Carl wrote:
I can't comment on whether the VS IDE shows
OutputDebugString messages when
 
Back
Top