redirecting a debug string to the debug IDE window in non-MFC app (ala TRACE) 
Author Message
 redirecting a debug string to the debug IDE window in non-MFC app (ala TRACE)

Hi,

I hope this is an easy one: I would like to redirect a string to the debug
IDE window in a non-MFC app. Something like this:
TRACE(  "In MyFunction." );

I tried printf( "In MyFunction." ); and fprintf( stderr, "In MyFunction." );
but it doesn't work.

Thanks, John



Thu, 08 Aug 2002 03:00:00 GMT  
 redirecting a debug string to the debug IDE window in non-MFC app (ala TRACE)
Greets,

    You can use the Win32 API function, OutputDebugString() in order to send
output to the debug window.  It does not provide variable arguments, so
you'll either have to use sprintf() to store such in a buffer and use this
function or write your own wrapper function that provides support for
variable length arguments.

Regards,

Joe


Quote:
> Hi,

> I hope this is an easy one: I would like to redirect a string to the debug
> IDE window in a non-MFC app. Something like this:
> TRACE(  "In MyFunction." );

> I tried printf( "In MyFunction." ); and fprintf( stderr, "In
MyFunction." );
> but it doesn't work.

> Thanks, John



Thu, 08 Aug 2002 03:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. redirecting a debug string to the debug IDE window in non-MFC app (ala TRACE)

2. debug output in a non mfc app

3. Debug a none MFC program with the Debug Window

4. Sending debug trace to a debug terminal

5. Sending debug trace to a debug terminal

6. mfc debug output in a non-mfc exe?

7. Debugging apps external to IDE

8. Debugging code linked to non-debug versions of DLLs

9. Catching TRACE messages outside of VC debug window...

10. Debigging non-debug process and debug DLL

11. Heap Problems: Both Debug and non-Debug versions of CRT are active

12. NON-debug DLLs in debug

 

 
Powered by phpBB® Forum Software