- Home /
How to use NSight
From what I read in the beginning of : http://blogs.unity3d.com/2014/07/29/frame-debugger-in-unity-5-0/ it should be possible to use NSight to debug unity graphics, can someone tell me how to do this?
Answer by Matth3wThomson · Aug 24, 2015 at 02:31 PM
You can right click on the built exe and choose "Launch with Nsight HUD x.x"
Answer by Yan_An · Jun 12, 2017 at 06:24 AM
Thanks to @Matth3wThomson 's post, but right click on the exe and use 'Launch with Nsight HUD x.x' will only bring you part of graphics debug experience of Nsight. Here is more detail answer descriptions for Nsight and TGD.
Nsight
Where to download Nsight
How to use Nsight to debug your Unity app
Build your Unity project, for example, after build, the UnityVRSamples project will be placed in a directory with 'UnityVRSamples.exe' and 'UnityVRSamples_Data' folder
Create a dummy Visual Studio project, for example, just a simple 'Win32 Console Application' in Visual Studio named ‘UnityVRSamplesDummy’
Right click on your project (not your solution) and choose ‘Nsight User Properties’
Set the 'Launch external program' and 'Working directory' of your UnityVRSamples.exe
Start the debug session by click on Nsight menu in Visual Studio -> Start Graphics Debugging
After that, you should be able to see your app is running.
The Unity app generally have a configuration dialog box, choose your settings and click on ‘Play!’, you should see your 3D scene
Move to the frame you want to debug/profile with Nsight
Click on Nsight menu->Pause and Capture Frame to make the target app pause for debug/profile
You can also use the shortcut: Ctrl-Z then Space in your app to pause the app
Use several Nsight Views to debug/profile your app, it’s under Nsight menu->Windows
It contains: Api Inspector, Api Statistics, Current Target, Events, Geometry, Range Profiler, Resources, Scrubber
Nsight also support Dynamic Shader Editing, serialize the frame to C/C++ project
TGD
Where to download TGD
How to use TGD to debug your Unity app on real device
Build your Unity project for Android device, for example, after build, you should see your project’s apk placed in the directory you specified
Install the apk to your kit, for example:
# adb install TanksTutorial.apk
Open TGD, it should pop-out a Launch and Connect dialog box
Make sure your kit is selected in the Target
Click on the ‘Install Debugger’ button with red icon, after that, it should become a green icon with word ‘Remove Debugger’
This is very important, make sure you meet a green icon with ‘Remove Debugger’ button
Make sure you can find your Unity app
Make sure you already configured the adb to your system, TGD will identify it automatically
Select the app you want to debug, click on ‘Launch’ button
You should see the app is running on your kit
TGD should show you several views about Performance Tests View, Signal Graph View, Linked Program View
If you can’t see them, check the Frame Debugger menu in TGD
Click on ‘Capture Frame’ button to enter pause mode for debug and profiling your app
After capture frame, TGD offer several views for frame debug and profiling: Api Inspector, Api Statistics, Current Target, Events, Geometry, Linked Programs, Range Profiler, Resources, Scrubber
TGD also support Dynamic Shader Editing, serialize the frame to C/C++ project
Support
Where to get more help about Nvidia Graphics Tools
Ask question in forums
https://devtalk.nvidia.com/default/board/154/tegra-graphics-debugger
Check the doc
Nsight
- Nsight menu in Visuatl Stuido->Help - Online Help - Local Help - Support Forums - TGD - Help menu in TGD->Documentation - Some videos and webinars - https://developer.nvidia.com/nsight-visual-studio-edition-videos - https://developer.nvidia.com/developer-webinars
Not sure why, but the forum's format logic doesn't follow with standard $$anonymous$$arkdown syntax, which make the last words be mess up. ;(
Your answer
Follow this Question
Related Questions
Does Intellitrace support Unity3D? 0 Answers
Cannot debug errors created by Debug.Assert() 0 Answers
How do I check for errors in Visual Studio 1 Answer
ios script debugging using Visual Studio 0 Answers