Enhanced debug logging for Unity, with file export and HTML viewer.
- Output Unity debug info to log files (csv, tsv, json, txt)
- A nice web interface to view the log files (csv, tsv, json)
- HTML5 (single file)
- No external dependencies
- Searchable via message, stacktrace, timestamp, logtype
- Filterable by logtype
- Be able to drop it into existing projects
- Import the latest release's package into your project
- Move the prefab
Unity File Debug
into your scene - Setup the filepath and settings in the inspector
- Copy the HTML to your output path via inspector button
- Use
Debug.Log
as normal, or for more advanced usage see Tester script inDemo
folder - Open the
UnityFileDebugViewer.html
file from your log folder, browse for a log file from the top left
If you don't specify an absolute filepath, Application.persistentDataPath will be used.
HTML viewer is designed for modern browsers (chrome/firefox)
- Fork/clone this repository
- Open in Unity
- Hack away
- Change DLogType enumeration in DebugWrapper.cs
- Update
topLogTypes
andnestedLogTypes
arrays in UnityFileDebugViewer.html - Update
LogTypeColors
css in UnityFileDebugViewer.html - Update svg icons in UnityFileDebugViewer.html
- Move all elements from
nestedLogTypes
array totopLogTypes
in UnityFileDebugViewer.html
The viewer supports a few different file formats
{
t: '', // type
tm: '', // time
l: '', // log message
s: '', // log stack trace
}
type,time,log,stack
type time log stack
In the Unity Editor, click the menu option SSS/Util/Package/Unity File Debug
. The UnityFileDebug.unitypackage
will be in the root of this project.