Tutorial: Debugging with Intel® Distribution for GDB*
Set a breakpoint inside the kernel to the line marked as breakpoint-here and run the application. Microsoft Visual Studio* starts the instance of Intel® Distribution for GDB* that is responsible for debugging kernels offloaded to GPU. The program will stop at the breakpoint. You can investigate local variables, registers, and disassembly by opening the corresponding windows from the Debug tab.
Open the kernel file (.CL) in Microsoft Visual Studio and set a breakpoint at the desired line. The breakpoint is hit after running in the remote debug mode.
If the breakpoint is not hit, verify the following:
-s flag in clBuildprogram defines the absolute path of the kernel source file.
The kernel source file is accessible on both host and target systems.
Debugging option is enabled for Intel® Distribution for GDB* with Enhanced GPU Offload. Refer to the setup instruction.