View Unity console logs directly in Rider 2018.1

Posted on by Matt Ellis

Last time, we looked at how Rider 2018.1 introduces a new Unity editor plugin which allows us to build deeper integration with Unity. We saw how we can now control play mode and step single frames without having to switch away from Rider.

In this series:

In this post, we’ll take a look at another new feature that will also help reduce the amount of time you spend switching between the Unity editor and Rider – the new Unity log viewer.

Unity log viewer tool window

This tool window, which is only available when we are connected to the Unity editor, brings Unity’s Console window right into Rider. It will be updated as events are logged in Unity, and allows filtering based on category (error, warning or message). You can also show and hide events based on when they were logged – in play mode, or edit mode.

Stack trace explorer

Of course, Rider likes to go the extra mile. You might be used to log entries being a plain block of text in Unity, but Rider makes them interactive, and allows you to navigate to any source file, class, method or property mentioned in the log entry.

Rider parses each message in the same way it does for the Stack Trace Explorer feature. Paths and line numbers are converted into hyperlinks, and clicking takes you straight to the line.

Even better, class, method and property names are also converted into hyperlinks, and clicking these navigates to the appropriate place in source code. And if you don’t have the source for that particular class, don’t worry – Rider will decompile it on the fly for you.

Unity log viewer navigating to stack trace

Switch to play mode, collect logs and finally, easily navigate to the code mentioned in logs, all without leaving Rider.

Next time, we’ll look at the new unit test runner integration. Stay tuned for more!

Download Rider today, and give the new Unity editor integration a go! Let us know how you get on – leave comments here, or raise an issue in YouTrack or on GitHub.

Comments below can no longer be edited.

5 Responses to View Unity console logs directly in Rider 2018.1

  1. Lior Tal says:

    April 15, 2018

    These changes are only available as part of the EAP. that was not mentioned throughout the article 🙂

    still very interesting though ! going to check it out.

  2. Olivier Pons says:

    April 25, 2018

    In your log, what saved me a lot of time is the fact that you can click on each function call and the concerned file immediately opened. Good job!

  3. Miha Rataj says:

    August 1, 2018

    I like this feature a lot! Are there some improvements already planned? I would love to see the following things:
    – introduce textbox for filtering by line (like in Editor Console Pro)
    – the scroll view should automatically scroll to the latest message when the new message is added and user was already navigated at the bottom of the scroll view
    – it’s hard to distinguish between calls inside stack trace explorer (I would suggest different background color for even/odd lines, just like Unity does in Console window)

  4. Ferdinand says:

    January 19, 2020

    Is there a way to use this to load up a saved output_log.txt file? For example, I have the log of someone who experience a bug, and wanted to view the log but just using plain Notepad to read it is a hassle to look at. I’d like the feature where the stack trace turns into links so I can quickly see the source code.

    • Matt Ellis says:

      March 10, 2020

      The Unity log view won’t help here, but you might want to take a look at the Ideolog plugin, which has a lot of functionality for viewing and navigating logs. Check out this blog post for more details.

Subscribe

Subscribe to .NET Tools updates