From a Console Application project in Visual Studio, I want to redirect Console
's output to the Output Window while debugging.
相关问题
- How to know full paths to DLL's from .csproj f
- Importing NuGet references through a local project
- Visual Studio 2019 - error MSB8020: The build tool
- 'System.Threading.ThreadAbortException' in
- Pass custom debug information to Microsoft bot fra
相关文章
- How to show location of errors, references to memb
- How to track MongoDB requests from a console appli
- Visual Studio Hangs on Loading UI Library
- How to use Mercurial from Visual Studio 2010?
- How do I get to see DbgPrint output from my kernel
- Copy different file to output directory for releas
- Edit & Continue doesn't work
- “Csc.exe” exited with code -1073741819
Note if you're using dkackman's method but you want to write the output to BOTH the console window and the debug window, then you can slightly modify his code like this:
Thanks, Alex F, nice solution, but didn't work for me, because my project was created by cmake. So, to do as Alex F suggested, add
WIN32
orMACOSX_BUNDLE
toadd_executable
You can change it to System.Diagnostics.Debug.Write();
Actually, there is an easiest way: In the "Options" window of Visual Studio (from the Tools menu), go to "Debugging" then check the option "Redirect All Output Window Text to the Immediate Window".
Try Trace.Write and use DebugView
** note that this is roughed together almost pseudo code. it works but needs work :) **