0

I have this very simple program (a test one), to test the function OutputDebugString.

#include <Windows.h>
#include <stdio.h>
#include <winternl.h>

int main()
{
    OutputDebugStringA("Hello string");
    return 0;
}

However, when I run it and open dbgView, it won't show up there. I ran both programs as administrator. I have no clue on what the problem might be. Help

nortain32
  • 69
  • 1
  • 7
  • Have you tried not to run dbgview as administrator? – Simon Mourier Nov 17 '22 at 19:04
  • yeah, I tried running it as administrator only after it didn't work as not administrator. – nortain32 Nov 17 '22 at 19:07
  • 1
    It works for me if I run it not as admin. Always had various problems with DbgView (including locked .sys driver etc.) that's why I wrote an alternate version : https://github.com/smourier/TraceSpy that doesn't everything it does but works for most cases. – Simon Mourier Nov 17 '22 at 19:13
  • 4
    Are you running your app inside a debugger? DbgView can't capture messages when the app is inside a debugger, the debugger will get the messages instead – Remy Lebeau Nov 18 '22 at 01:38
  • *However, when I run it and open dbgView, it won't show up there.* Besides, [DebugView will immediately capture debug output after starting](https://learn.microsoft.com/en-us/sysinternals/downloads/debugview#installation-and-use). @nortain32 – YangXiaoPo-MSFT Nov 22 '22 at 05:09

0 Answers0