Debug Java and Native Code


The following instructions are only applicable to Android users.

In order to debug both Java and native code, the Debug Mode in the project debugging properties must be set to Java and Native code.

The debugger can only be stopped in either Java or native code at any given time. When encountering a Java breakpoint, the debugger will stop in Java code. Likewise, when encountering a C/C++ breakpoint, the debugger will stop in C/C++ code. When Break All is selected, the debugger uses the active editor to determine if it should stop in Java or native code. For .java files, the debugger will stop in Java code. For .c, .h, .cpp, .hpp, .cxx, and .hxx files, the debugger will stop in C/C++ code.

By default, a prompt will be displayed if the type of stop cannot be determined from the active editor.

This can be changed in the Tools > Options… > Nsight Tegra > Debug > Code to stop in by default option.

When the debugger is stopped in native code, Java threads may not be inspected. This is because the entire process is suspended and the Java virtual machine is not able to respond to commands.

A breakpoint set in Java code will not be installed until the program is resumed and the virtual machine can respond to the breakpoint request.

 

 


NVIDIA® GameWorks™ Documentation Rev. 1.0.200608 ©2014-2020. NVIDIA Corporation. All Rights Reserved.