How to send trace messages to VS output panel from a native windows service

U

Udi Ben Senior

Hi,
I have a managed windows service that uses a native C++ dll.
I'm launching the VS (2010) debugger using Debugger.Launch() and i'm
able to attach to the service and debug the unmanaged code as well.
When i'm outputting trace messages from the managed code
(System.Diagnostics.Trace) they are displayed in the output window
just fine,
however i couldn't find any way to do the same from the unmanaged
code.
I tried:
_CrtDbgReport()
ATLTRACE()
OutputDebugString()

none of them worked, the messaged were not displayed in the debugger's
output window.
Anyone knows this can be done?
Thanks,
Udi
 
V

Victor Bazarov

I have a managed windows service that uses a native C++ dll.
I'm launching the VS (2010) debugger using Debugger.Launch() and i'm
able to attach to the service and debug the unmanaged code as well.

Debugger, IDE, other tools are, unfortunately for you, *off-topic* here
in a *language* newsgroup.
When i'm outputting trace messages from the managed code
(System.Diagnostics.Trace) they are displayed in the output window
just fine,
however i couldn't find any way to do the same from the unmanaged
code.
I tried:
_CrtDbgReport()
ATLTRACE()
OutputDebugString()

none of them worked, the messaged were not displayed in the debugger's
output window.

Your question has nothing to do with the C++ language, the subject of
this newsgroup.
Anyone knows this can be done?

Yes, someone in a Microsoft debugger/IDE forum would. Look on their web
site for "developer tools" (you can start by visiting this page:
http://www.microsoft.com/communities/forums/default.mspx).

Good luck!

V
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,776
Messages
2,569,603
Members
45,189
Latest member
CryptoTaxSoftware

Latest Threads

Top