Developer Guide for Intel® SDK for OpenCL™ Applications
To enable debugging mode in the Intel® OpenCL™ Runtime for compiling OpenCL code using Intel® SDK for OpenCL™ Applications - Debugger plug-in for Microsoft Visual Studio* IDE, do the following:
-s <full path to the OpenCL source file>
If the path includes spaces, enclose the entire path with double quotes.
For example:
err = clBuildProgram( g_program, 0, NULL, "-g -s \"<path_to_opencl_source_file>\"", NULL, NULL);
Relative path to the CL file is not supported.
According to the OpenCL standard, work-items execute OpenCL kernels simultaneously. The Debugger requires setting the global ID of the work-item to debug before the debugging session starts. The Debugger stops on breakpoints in OpenCL code only when the pre-set work-item reaches them.
To work with the Intel SDK for OpenCL Applications - Debugger plug-in for Microsoft Visual Studio* IDE, the OpenCL kernel code must exist in a text file, separate from the code of the host. Debugging OpenCL code that appears only in a string embedded in the host application is not supported. Create your OpenCL project with the Intel® Code Builder for OpenCL™ API plug-in for Microsoft Visual Studio* to get seamless integration with the Debugger.