Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OutputDebugString and UWP (Windows 10) #365

Open
hummeleBop opened this issue Nov 9, 2019 · 5 comments · May be fixed by #398
Open

OutputDebugString and UWP (Windows 10) #365

hummeleBop opened this issue Nov 9, 2019 · 5 comments · May be fixed by #398

Comments

@hummeleBop
Copy link

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.

@otrejoso
Copy link

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

@hummeleBop
Copy link
Author

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

@janwilmans
Copy link
Member

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...

@otrejoso
Copy link

otrejoso commented Aug 3, 2020

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.

@janwilmans
Copy link
Member

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants