- Home /
Where does Unity store the compile log?
Every so often I get an error of this form...
"Internal compiler error. See the console log for more information. output was:Stacktrace:"
Its a bitch to debug because I don't know what file triggered it. Is there a compile log somewhere that will show me what file compile got up to before it died?
If not, there really should be...
Answer by Jeff-Kesselman · Jun 08, 2014 at 05:52 PM
Answer: The log is available through the pull down on the console, but is mostly useless.
There appears to be no way to actually get mcs.exe to print the name of each file as it parses it (adding a -v flag didn't help).
Answer by PouletFrit · Jun 08, 2014 at 04:16 PM
In the console window, there should be the thing with a small arrow and three lines, that allow you to see more option and under that menu there should be a "Open Editor Log"... Is that what you are looking for?
Ah, okay. It was buried. You need to detach for "Stacktrace" but it IS in there.
Very helpful, thank you.
edit: hrm spoke too soon. It doesn't list the files as it compiles them. $$anonymous$$aybe there is an option somewhere....
doesn't it give you an error message somewhere? something like
-----CompilerOutput:-stdout--exitcode: -123456789-- compilationhadfailure: True--outfile: Temp/Assembly-CSharp.dll
* Assertion at ..\mono\metadata\myclass.c:1111, condition `class->image->dynamic || field->offset > 0' not met
I didn't see one. The compiler itself threw a stack trace.,
I'm trying adding a gmcs.rsp with -v in it to see if a verbose output will tell me more..
Have found an error message.. not sure how helpful it is...
Temp/Assembly-CSharp.dll * Assertion at class.c:1727, condition `class->image->dynamic || field->offset > 0' not met
i have seen errors like this trying to use dynamic types but i just did a search for the word dynamic in the codebase and came up empty...
I would try the old good trick, create a new project and reimport all your scripts.. just to see if it compile without error... it feel like if your mono master is screw for whatever reason
Answer by Pescu · Jun 08, 2014 at 04:56 PM
If you run it in unity, you can see the log in the console (Window/Console, or press CTRL+Shift+C)
Answer by tcz8 · Sep 24, 2020 at 08:01 PM
I finally found a real answer thanks to this: https://answers.unity.com/questions/1689167/how-do-you-do-a-verbose-build-so-that-compiler-err.html
You need to start the editor using its executable within a command prompt with "-logFile -" as an argument ie.: "Unity.exe -logFile -"
Mind that trailing hypen in "-logFile -" it means STDOUT (standard output) which is old school for console (in this case the command prompt). If you want the log output in a file instead, replace the hyphen with a path ie.: "C:\logfile.txt"
When the editor starts leave the command prompt open/minimized and any log info and error should pop up inside it.
For more details on how to open an command prompt window: https://www.itechtics.com/open-command-window-folder/