View Unity console logs directly in Rider 2018.1

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.

This entry was posted in How-To's and tagged , , . Bookmark the permalink.

3 Responses to View Unity console logs directly in Rider 2018.1

  1. Lior Tal says:

    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:

    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:

    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)

Leave a Reply

Your email address will not be published. Required fields are marked *