Open madeso opened 1 year ago
I think I'm having the same problem.
I have a console application that outputs a very long string as part of a yaml property. When piping the output into a file, the line is wrapped. The same doesn't happen when running the program without piping.
I also want to increase the width from 80 to 120 characters !
Information
Describe the bug When running a spectre console app through visual studio as a custom build,
System.Console.BufferWidth
throws aIOException
and sets the console width to 80 (I'm guessing based on reading this and this) . This makes sense in general, but when outputting errors (and especially when including the path to the file) , lines can get pretty long, and as far as I can tell visual studio only reads the first line when parsing the output for the error list.Visual studio error list:
Output from app (Visual studio output):
To Reproduce Run a spectre enabled program that prints a line longer than 80 as a build step from visual studio.
I used the following to trigger a run via cmake in another solution
Expected behavior I'm honestly not sure what I expect. Like I said, 80 makes sense in general but it would be great if the word wrap could be disabled or the default could be changed for the special cases when a console can't be detected.
For example:
Additional context For a workaround I detect if there isn't a console attached and switch to
Console.WriteLine
, not a elegant solution but it works.Please upvote :+1: this issue if you are interested in it.