Isn't there no way to show debug console in standalone build?

Hi.

I have many Debug.Log(“something”); in my entire code.

But I want to see it at standalone build too.

How?

Build Setting’s [Development Build] checkbox is related?

I tested checked it and run, but still can’t see debug console message, it just show screen’s right-below’s “Development build” white text.

1 Like

You’ll have to do it yourself, Unity doesn’t support Debug on standalone builds as far as I know.

In this case, IO to the rescue!

Debugger.js

import System;
import System.IO;

static function Log (debugMsg : String) {
      var path : String = Application.dataPath+"/debugLog.txt";
      var sw : StreamWriter = new StreamWriter(path, true);
      sw.WriteLine(debugMsg+"\n");
      sw.Close();
}

Don’t attach the Debugger.js anywhere, it works just by being at your Project Tab.

All you need to do from now on is use Debugger.Log( ) instead of Debug.Log( ). The debug messages will be sent to the debugLog.txt file in your game’s folder (it will create a new file if none exists).

1 Like

oh it works! Thank.

sure Debug works.
it writes into the log thats created. On windows builds its output.txt in the xxx_data folder, on osx its in ~/Library/Logs/Unity/player.log

alternatively search the board for DebugStreamer for example

1 Like

@dreamora

Thx. you are right. It just written in output.txt

You can always just click on “Open player log” in the editor; you don’t have to worry about where the debug.log output actually is.

–Eric

that only works on osx. windows has no bloated ultra log folder like osx, its per application or not present at all if you disabled logging.

Hi I wrote a blog post about how I’m showing all debug information in an on-screen GUI window. Hope that’s helpful.