The only thing you need to remember is to start your application not under the debugger since this API does need to make use of Windbg under the hood to make this output happen. An interesting side note might be that what you have seen is a process that
did start a debugger, attach it to itself and did control the debugger. Self debugging at its best. This functionality is also exposed via the CdbEng (pure Windbg) and MdbEng (managed debugger).