DebugViewPP icon indicating copy to clipboard operation
DebugViewPP copied to clipboard

OutputDebugString and UWP (Windows 10)

Open hummeleBop opened this issue 4 years ago • 5 comments

Outside of UWP app, OutputDebugString works fine. But if I try a direct call to OutputDebugString from inside a UWP style app (Windows 10), DebugView++ never shows the message. I would like to observe OutputDebugString output without attaching Visual Studio debugger. Is there a way to use your DebugViewPP with UWP ? It should be available because SysInternals Debug View is able to show UWP messages.

hummeleBop avatar Nov 09 '19 00:11 hummeleBop

Has there been any traction to fix this? I just stumble upon this bug on one my apps.

otrejoso avatar Jun 19 '20 16:06 otrejoso

There is probably no easy way to get debug information from an uwp APP. I use windbg preview from the microsoft store for this.

hummeleBop avatar Aug 02 '20 23:08 hummeleBop

This isn't anything I can do (I think) the hooks that SysInternals Debug View is using are kernel hooks that I can't access, (if anybody knows how to do it, please chime in)

However, you can open send UDP or TCP messages to debugview++ from any application...

janwilmans avatar Aug 03 '20 07:08 janwilmans

Not sure what kernel hooks you were trying to access, but in the past when things are sort of prohibited in certain windows applications, and I tend to access them by loading the library that contains those functions. For more info go to: https://stackoverflow.com/questions/8696653/dynamically-load-a-function-from-a-dll I applied this technique to create very simple call stack in one of my window store applications calling forbidden class from kernel32.dll and Dbghelp.dll.

otrejoso avatar Aug 03 '20 21:08 otrejoso

The problem is, you want to hook into the DbgPrint calls that other applications are calling, this is possible if you write a small kernel driver and I believe this is what Dbgview does. At startup it exacts a .dll, containing the kernel driver that hooks into DbgPrint and copies the messages into a piece of shared memory, that is then retrieved by dbgview. I don't have the knowledge/experience to do this. And although I would like it if debugview++ could do this, I don't consider it worth my time to learn this. The use-cases where I really needed it, I just write messages to a logfile and tail that using debugview++, or send UDP messages.

janwilmans avatar Aug 04 '20 12:08 janwilmans