Intel® oneAPI DPC++/C++ Compiler
Talk to fellow users of Intel® oneAPI DPC++/C++ Compiler and companion tools like Intel® oneAPI DPC++ Library, Intel® DPC++ Compatibility Tool, and Intel® Distribution for GDB*
789 Discussions

gdb-oneapi run error "An exception is caught for vector add"

eddie_patton
New Contributor II
1,037 Views

oneAPI 2025

Windows 11

Visual Studio Code

I've read that gdb-oneapi gpu debugging is only available for linux, but I thought I'd give it a try because there is a gdb-oneapi.bat in Program Files (x86)\Intel\oneAPI\debugger\2025.0\bin

I used the vector-add example, ran the setvars command in the terminal, ran cmake and then nmake. The vector-add-buffers.exe runs in the terminal as expected. 

To build:

build> cmake -G "NMake Makefiles" -DCMAKE_BUILD_TYPE=Debug ..

build> nmake cpu-gpu   

I set a breakpoint on the first line of code after main()

I ran the VS Code environment setup by Ctrl-Shift-P and selected "Intel oneAPI: Initialize default environment variables"

When I configure a launch.json to run using gdb-oneapi, I get a "Paused on exception" after selecting the VS Code run button. 
The output in the terminal window is 

 

 

& 'c:\Users\Eddie.Patton\.vscode\extensions\ms-vscode.cpptools-1.23.3-win32-x64\debugAdapters\bin\WindowsDebugLauncher.exe' '--stdin=Microsoft-MIEngine-In-4kb3mbwo.e2g' '--stdout=Microsoft-MIEngine-Out-dfzcvjax.ms4' '--stderr=Microsoft-MIEngine-Error-mj1yfego.hsv' '--pid=Microsoft-MIEngine-Pid-z10rjzt3.2cc' '--dbgExe=C:\Program Files (x86)\Intel\oneAPI\debugger\latest\env\\..\opt\debugger\bin\gdb-oneapi.exe' '--interpreter=mi'

 

 

I'm not sure why the WindowsDebugLauncher.exe is above, it doesn't seem right to me. 

and VS Code shows the thread stack

eddie_patton_0-1736566975248.png
I've attached the launch.json file.

0 Kudos
2 Replies
Sergey_Bobko
Employee
743 Views

Hello @eddie_patton !,

Thank you for your question,

To better understand the issue, could you please modify your launch.json configuration by adding the following logging options?:

"logging": {
"moduleLoad": true,
"trace": true,
"programOutput": true,
"exceptions": true
},

Additionally, in "setupCommands", please include:

{
"description": "logging file",
"text": "set logging enable on",
"ignoreFailures": true
}

After applying these changes, please share the gdb.txt file and log from the DEBUG CONSOLE.

This will help me analyze the behavior and provide a more accurate response.

 

Best regards,
Sergey Bobko

0 Kudos
eddie_patton
New Contributor II
621 Views

Thanks for the reply Sergey. I'll make the change soon. I have some high priority work tasks that are getting in the way. 

Cheers

Eddie

0 Kudos
Reply