Debugging problem in Visual Studio 2017

I am the very beginner in OpenCL programming. My problem occurs when I try to debug OpenCL kernels in Visual Studio 2017. Debugger don’t stop on breakpoints in kernel code but works fine in the Main function. I have installed Intel System Studio 2019.

I build context in this way:

cl_int platform_id = 0;
cl_int device_id = 0;
cl_context_properties contextProps[3] = {

cl::Context context(CL_DEVICE_TYPE_GPU, contextProps, NULL, NULL, &errorState);

I try to build program with debugging options:

cl::Program program(context, source);
errorState =, "-g -s C:/OpenCL_Intel/OpenCL_Intel/");

After this I set parameters for kernel function and run the kernel:

cl::Kernel kernel(program, "multiply", &errorState);
kernel.setArg(0, inA);
kernel.setArg(1, inB);
kernel.setArg(2, outCL);
kernel.setArg(3, arraySize);

cl::Event event;
errorState = queue.enqueueNDRangeKernel(kernel, cl::NullRange,
    cl::NDRange(arraySize), cl::NDRange(1), NULL, &event);
checkErr(errorState, "ComamndQueue::enqueueNDRangeKernel()");

errorState = queue.enqueueReadBuffer(outCL, CL_TRUE, 0, sizeof(int) * arraySize, out);
checkErr(errorState, "ComamndQueue::enqueueReadBuffer()");

My debugging options in my OpenCL project:


I have also set some options in Code Builder:

[li]API Debugger -> Enable OpenCL Tools API Debugger -> True
[/li][li]GPU Kernel Debugger -> Enable Debugging -> True

Thank you in advance