- Home /
How to see Unity Debug.Logs in Visual Studio?
I have seen posts saying that Unity debug logs should automatically appear in Visual Studio. Where can I see these logs?
I can see my logs in Unity:
But nothing in Visual Studio even though I attach to Unity and can debug with breakpoints:
I'm on Mac Catalina, Visual Studio Enterprise 8.6 and Unity 2019.2.21f1.
Any ideas?
Edit I also don't see the logs in the Application Output window (I would add an attachment, but looks like there's a limit of 2 per question :/).
I googled "visual studio mac output window" and found a few solutions (within first 5 results) to how to get to the output window (sorry, do not have a mac)
I also don't see the log messages in the Application Output window :/
Answer by MKGPlayz · Jun 10, 2020 at 12:59 AM
Here you go.
using UnityEngine;
using System;
public class PrintVS : MonoBehaviour {
// You can store your text in a variable
public string Message = " Hope";
void Start(){
Debug.Log("Hope " + Message);
//Use this line of code (it's built-in C# Syntax)
Console.out.WriteLine("Hope " + Message);
}
}
Hm, and where do these Console.Out.WriteLine
messages show up? $$anonymous$$y "Application Output - Unity Editor (background)" window is still empty :/
Answer by DSivtsov · Dec 16, 2021 at 07:35 PM
@felixmann You can use Workaround: The Unity editor save all its output to log file. Common place of this log is C:\Users\\AppData\Local\Unity\Editor (Editor.log). You can watch it by every text Editor (more helpful Notepad++, because it can automatically update the showing content). Unity Editor send to this file the all output of its Debug.Console, not only the short version which we see at Debug.Console. In summary its look little weird, but for short checking is normal. Also the Unity Editor send to this file the output of System.Console.WriteLine()
(but doesn't show it in the standard Unity Debug.Console) and it's heavy to find that it, but it's possible
Your answer
Follow this Question
Related Questions
Unity 5.2, VS Community 2015 and Debug logging 0 Answers
Why are Vector2 parameters of methods , set to be = new Vector2 , read as being null by dll ? 1 Answer
Cant attach debugger | Compile Errors in VS but not in Unity? 0 Answers
How to uninstall visual studio? 0 Answers
how to link external visual studio programs to unity project? 0 Answers