Closed PatrickRyder closed 4 years ago
There is no way to modify the text in the Visual Studio output window. From what I an tell, this is by design. Coloring is done by adding classification objects to the output via notifications from VS. It's tempting to think the RegEx can work as a find and replace but VS disallows this.
You're not the first to ask for something like this. Usually the request is to delete lines from the output window. Something else that's not possible with VS at the moment.
Thank you for the information, Mike. Any way to poke Microsoft about this maybe?
This project looks great and I'd happily donate, except that it is missing one feature I've been after for ages: the ability to do a RegEx replace in log lines.
This is a typical log line from my application:
2019-11-14 12:58:17.488606+0000 MyApplication[4946:133542] @@@|12:58:17:488|DT|AUDIO..|.|Debug|MyApplication\MyApplication.iOS\Platform\AudioPlayerAmbient.cs|369|Waiting for ambient audio player (attempt 2 of 20...
My code actually only writes the part that begins with '@@@'; everything before that is helpfully added by my development tools. Each line thus ends up a lot longer than I'd like and I find the useful stuff I really want to see is off the right-hand edge of the console window.
I'd love to be able to create a RegEx to match everything up to and including the '@@@' and then replace it with an empty string.
At the moment, I have to save the output and then open it in TextAnalysisTool.NET. This doesn't do the filtering I've described but does allow me to view the logs reasonably well.
This, for me, would make your extension an indispensable part of my toolset and I'd happily pay good money for the improved productivity!