c++cdebuggingcudacuda-gdb

Cannot see any variable values while debugging


I am using Nsight on Ubuntu 16.04. My current set up allows me to compile and run my code perfectly fine through the nsight IDE. After making sure the program was building in debug mode (wasn't originally), it finally allowed me step through my code.

The problem I am having is whenever I try to debug my code, all the variables say "not available". Also, if I hover my mouse over the variable it was saying something like "-var-create: unable to create variable object". This made it seem like maybe it was the compiler? Maybe it is not adding something it was supposed to do?

Nsight version is 7.5, GCC & G++ version 5.3.1, GDB version 7.11, NVCC version 7.5.17.


Solution

  • After messing around in the IDE I found an option that fixed the problem. I went to Window -> Preferences. Then under C/C++ -> Debug -> GDB go to the Pretty Printing section and remove the check mark on "Enable Pretty Printers..."

    This is what fixed that issue for me. I just don't really know what pretty printing is. I hope it doesn't have side effects because of disabling it.