resharper-unity icon indicating copy to clipboard operation
resharper-unity copied to clipboard

Ability to redirect tracepoint output to Unity console

Open oxysoft opened this issue 6 years ago • 6 comments

Tracepoints are hugely useful, however the output is not in a very useful place for a developer working with Unity3D. In fact I remember a while back it took me quite some time to find where they went initially. It would be a huge win if we could set tracepoints and see their output directly in the Unity console. They could be prefixed with "[TRACEPOINT]" or something for clarity sake.

(to be clear, when I say tracepoint I mean a breakpoint with Evaluate and log set and suspend off)

oxysoft avatar Jul 26 '19 18:07 oxysoft

Thank you for the idea. Couple of screenshots would help a lot. By "Unity console" do you mean in Rider or in Unity?

van800 avatar Jul 26 '19 19:07 van800

I mean the console inside of Unity but I think both would be nice. Essentially, hitting a tracepoint would result in Debug.Log firing with the evaluated content of the tracepoint to print.

oxysoft avatar Jul 26 '19 20:07 oxysoft

Second this, it would be super helpful!

DmitriyYukhanov avatar Dec 09 '19 13:12 DmitriyYukhanov

Must have )

mfandreich avatar Dec 09 '19 13:12 mfandreich

This is a must have!

ps. I was searching to find where the tracepoint log is. The answer is here in the Debug Output tab. Not Console tab. Not Event Log tab. And that was often flooded with thread messages.

image

5argon avatar Dec 15 '19 07:12 5argon

Workaround for this is to create a function somewhere in your project and call it in the Evaluate and log

using JetBrains.Annotations;
using UnityEngine;

namespace Util
{
    public static class RiderUtil
    {
            [UsedImplicitly]
            public static T Log<T>(T s)
            {
                Debug.Log(s);
                return s;
            }
    }
}

image

I have also requested some debugger api, so we could make it more strait-forward. https://youtrack.jetbrains.com/issue/RIDER-59076

van800 avatar Mar 03 '21 10:03 van800