Const changing while moving out of function in debugger

l.e.v.d.wal
Mon, 13 Apr 2026 14:45:48 +0000
CUDA-GDB

While attempting to debug a CUDA program I was inspecting a specific function call inside a kernel. I was inspecting the sudden changing of a variable value which was marked as a const. Now, I noticed that when I continued using stepping over until the return statement was hit and it went back to the function call the value did not change at all as it should.
However, if I use the Step Out(F11) then the value does actually change when it should not. Does anyone know why this happens, and how I can prevent it from happening when using step out?
I am using VSCode to debug.

3 posts - 2 participants