I want to write message while code is running (stopping changes the results), I know Debug.Print will write to Output or Immediate Windows in VS 2017 but so does all kinds of stuff I don't care about including Telemetry Messages and System.Windows.Data Error 2 and 4" from Visual Studio. I have disabled everything under Options/Debug/Output Window except "All Debug Output". Is it possible to sent all of Visual Studio stuff (listed under Options..) to the Output Window and only send message I write to Immediate Window or can I create my own Window with just me messages? The application runs for hours and only infrequently outputs a message but VS writes almost continuously so my messages are lost.
Asked
Active
Viewed 179 times
0

Paul Cohen
- 241
- 4
- 14
-
I think you could write your own extension, but it will require the high extension knowledge with debugging API:https://docs.microsoft.com/en-us/windows-hardware/drivers/debugger/debugger-engine-and-extension-apis#dml. We could disable some debugging output information: https://stackoverflow.com/questions/14720599/disable-noise-messages-in-debug-output-windows-visual-studio-2012. One debugger extension which could out to the custom debug window, not meet all your requirements, but maybe it could provide a path: https://marketplace.visualstudio.com/items?itemName=MadsKristensen.DebugTraceLogger – Jack Zhai Oct 23 '17 at 08:00
-
I have disabled everything available but lots of stuff still gets written. – Paul Cohen Oct 24 '17 at 09:53
-
Maybe you could add a screen shot about your current latest result if you get any update. What I could provide is that we could disable the output messages in the output window, but if you really want to write your own output window, you need to write the VS extension project. – Jack Zhai Oct 25 '17 at 03:19
-
I added a picture, none of what you see is anything I wrote. I have no idea what writes this stuff. – Paul Cohen Oct 26 '17 at 20:00
-
1If you not enable the Debugging option "Redirect all Output Window text to Immediate Window", do you mean that they are all in the output window? – Jack Zhai Oct 27 '17 at 06:26
-
If I don't enable the Debugging option "Redirect all Output Window text to Immediate Window then all the messages I don't want go to the Output Window which is where they belong but then so do my Debug messages so the end result is the same, I can't find my messages hence my original question. – Paul Cohen Oct 28 '17 at 16:49
-
1No direct solution for it, but maybe you could create a listener like this cases with a custom window: https://stackoverflow.com/questions/6380673/custom-debug-output-in-visual-studio-2010. A default extension tool which just add a new item in the output window: https://marketplace.visualstudio.com/items?itemName=MadsKristensen.DebugTraceLogger, I know that it was not the real tool you want to get, but maybe it could provide a path. – Jack Zhai Oct 30 '17 at 06:05
-
I though early versions of Visual Studio had a way to redirect my debug message to Immediate Windows when everything else was going to Output Window without sending everything to Immediate Windows. I don't see the point of just sending everything to one of two windows, what problem does that solve? I will look at the two questions, thanks. – Paul Cohen Oct 31 '17 at 06:33
1 Answers
0
The "Debug Trace Logger" by Mads Kristensen does exactly what I was looking for, thanks for the link.

Paul Cohen
- 241
- 4
- 14
-
Glad to know that it was helpful for you, you could mark it as the answer. Have a nice day:) – Jack Zhai Oct 31 '17 at 07:48
-
@JackZhai-MSFTI don't see how to mark your reply as Answer but it is. – Paul Cohen Nov 01 '17 at 23:00
-
The comment couldn't be marked, since you share the solution as the answer, so you could mark your reply as the answer. Not mine:), see: https://meta.stackexchange.com/questions/5234/how-does-accepting-an-answer-work. Have a nice day. – Jack Zhai Nov 02 '17 at 00:56