Visualizer doesn't work on Android Flatform [Nsight Tegra 1.6, VS 2013, UnrealEngine4]

Hi~

We are developing an android game using Nsight Tegra 1.6, Visual studio 2013 and Unreal Engine 4.
Unreal Engine provides UE4.natvis. So we can see FString on Windows Flatform.
But the visualizer doesn’t work on Android Flatform.
How can I make it work on Android Flatform?

Thanks.

UE4.natvis

Hi,

Unfortunately, visualizers support is internal to native VC++ debugger. We’ll have our own visualizers in a future version of Nsight Tegra, but you will need to convert the .natvis file to our autoexp.dat-like format. We cannot reuse the existing formats as is because of the difference between debugger backends.

Is this feature planned for a release? It would be very useful even in autoexp format. It would save a lot of clicking on tiny triangle icons.

The feature is implemented in Nsight Tegra 2.0 which is a part of TADP 3.0R4. You can find the visualizers folder in \Common7\IDE\Extensions\NVIDIA Corporation\Nsight Tegra\2.0\Debuggers\Visualizers.

The syntax is very much like autoexp, but with several differences dictated by the way backend works. We don’t have a format guide, but there are STL and C string visualizers to serve as an example. We load every .dat file from the root of the visualizers folder on debug launching.

Hi, I’ve tried to both make edits to this file and also add my own .dat file in the Visualizers directory, and in both cases the Android debugger fails to launch at the “pulling system/lib” step with the error:

“Failed to attach: Object reference not set to an instance of an object”

Is there any log I can look at to determine the cause of this error? Note that I’ve tried many combinations of styling my grammar after what is there, even for the simplest struct Vec2 {float x, y}; But any additions I make cause the error. Resetting the visualizers.dat file back to its original form causes the debugger to launch successfully.

Thanks!

Ajas

Hi Ajas,

This might be because of the incorrect syntax. I’ve tried adding a visualizer for the type you mentioned and it worked as expected (see below). You can find logs in %AppData%\NVIDIA Corporation\Nsight Tegra\Logs. Feel free to contact me directly via email I’ve provided in the PM if you have any further issues with Nsight Tegra.

Vec2 {
    preview (
        #(
            "(",
            $e.x,
            ", ",
            $e.y,
            ")"
        )
    )

    children (
        #(
            #([x] : $e.x),
            #([y] : $e.y)
        )
    )
}

Hi, this works great! I think I misunderstood the grammar, so this example is very helpful.

Some notes on the log file: It did not get generated at the location you described, so I edited NLog.config to just put it in the root directory:

<target name="logfile" xsi:type="File"
      fileName="d:/Nsight.log"

And when I restarted VC, the log appeared there. However, when I went back and re-entered an incorrect visualizer entry (by omitting a comma), the error does not indicate that the problem is a visualizer failure, in the log I only see:

2014-11-17 22:44:32.2930|INFO|Nvidia.PentaK.Core.RedirProcess|11-exited: code 0, finished in 15 ms
2014-11-17 22:44:32.2930|INFO|Nvidia.PentaK.Debug.DebugEngine|gdbserver connection type: cable
2014-11-17 22:44:32.4312|INFO|Nvidia.PentaK.AndroidPackage|[AndroidPackage] Mode changed to DBGMODE_Design

…and nothing more

When the syntax is fixed, and the debugger launches, the log appears as so:

2014-11-17 22:49:37.5247|INFO|Nvidia.PentaK.Core.RedirProcess|19-exited: code 0, finished in 16 ms
2014-11-17 22:49:37.5247|INFO|Nvidia.PentaK.Debug.DebugEngine|gdbserver connection type: cable
2014-11-17 22:49:37.5461|INFO|Nvidia.PentaK.Debug.C.CDebugValueProvider|Loaded visualizers from C:\PROGRAM FILES (X86)\MSVC12\COMMON7\IDE\EXTENSIONS\NVIDIA\NSIGHT TEGRA.0\Debuggers\Visualizers\visualizers.dat
2014-11-17 22:49:37.5996|INFO|Nvidia.PentaK.Debug.C.CDebugValueProvider|Loaded STL visualizers from C:\PROGRAM FILES (X86)\MSVC12\COMMON7\IDE\EXTENSIONS\NVIDIA\NSIGHT TEGRA.0\Debuggers\Visualizers\stl\gnustl.dat

So just be aware of how silently this parsing failure will manifest and prevent the debugger from launching entirely.

Anyway, this is a great feature otherwise, thank you!

Hi, I’m glad it worked for you :) Thank you for the detailed report of the visualizers issue, we’ll make sure this behavior is fixed in the next version.

I’m working on making some bindings for your flavor of autoexp that will ship in future versions of UE4. One of the things that has me stumped and I can’t find an example in the syntax is how to promote existing members after replacing the children.

In stock visual studio autoexp, this would have been done like, #([Members]: [$e,!])

Also, for auto installing the expanders, is there an environment variable or registry value with the current debugger visualizer location? I’d like to make sure a batch file can automatically copy the autoexp rules into the currently installed version.

Hi Nick,
Thanks a lot for your ongoing efforts to improve the integration between UE4 and our tool. Could you please provide me the autoexp version of the visualizer that you’re trying to adapt to our syntax?