- Home /
Outputting multi line strings to console?
I use Debug.Log for a large portion of my debugging and just in general workflow. It is how I often visualize that my data is correct and things are working the way I expect.
However it seems that Debug.Log can't handle strings with multiple lines in them. After like 2 newlines, the rest is just cut off.
Since I have complex objects with overriden ToString() methods, this is a real problem.
Does anyone have any suggestions?
Answer by Bunny83 · Dec 05, 2015 at 03:58 AM
The console can handle multiline debug logs just fine. However it doesn't have a scrollbar for the bottom detail view. But you can still scroll by selecting the text and scroll down that way.
A single debug log text is limited to about 64k characters. If you need more than that, you might want to use a custom logfile instead.
Ah ok see the real answer here is I did not know that you could click on a console entry and get that extra detail below! I simply saw them being cut off in the console view above.
Thank you!
Answer by jayvatar · Apr 16 at 07:21 PM
Ran into this as well. If you are using \n on your strings for console output, the default is 2 lines of output. If you want the main console scroll view to show more lines you can specify the amount of lines to show from the 3 dot panel on the right of the Console tab. ![alt text][2]
Your answer
Follow this Question
Related Questions
Multithreaded String Log Doesn't Update 0 Answers
Remove String Line If Contains Specific Word C# 1 Answer
Display the same string in multiple text boxes 1 Answer
Localization via script works in editor but not in build, why? 1 Answer
Best way to emulate Swift String Interpolation in UnityScript? 1 Answer