The makefiles in your repository support the following options that may help with debugging. The grading scripts also make use of some of these.
You can disable optimizations by building with
DEBUG=1, for example:
make clean make DEBUG=1 ./grading test
You can also enable AddressSanitizer, which helps to catch many memory access errors:
make clean make DEBUG=2 ./grading test
You can also enable the C++ standard library debug mode, which helps to catch e.g. out-of-bounds accesses with standard containers:
make clean make DEBUG=3 ./grading test
In CUDA tasks, you can also use
make DEBUG=1 for debug builds. This will compile with
nvcc -g -G so that you can easily debug your code with
Other debugging options are not supported for CUDA code.
After experimenting with the debug builds, please always remember to run
make clean afterwards.