Hello!
I have a project in vsCode, that is compiled by using fpm and the the Intel ifx compiler. I can compile and run the program just fine, however the gdb debugger does not stop on any set breakpoint. This is weird for me, because I can use the debugger just fine, when I use the gfortran compiler.
I read up on the compiler and a potential issue might be the code optimization done by ifx. To fix this, I’m using the --profile debug when compiling. I also found a gdb debugger in the Intel oneApi directories and tried to use it, but no luck here either.
Does anyone has an idea, what the problem exactly is and how I can fix it? Programming without a proper debugger is possible, but also painfully inefficient…
launch.json
{
"version": "0.2.0",
"configurations": [
{
"name": "fpmTest Debug Main",
"type": "cppdbg",
"request": "launch",
"program": "${workspaceFolder}\\build\\ifx_BDDC0259BFB63FA8\\app\\fpmTest.exe",
"args": [""],
"stopAtEntry": false,
"cwd": "${workspaceFolder}",
"miDebuggerPath": "C:\\Program Files (x86)\\Intel\\oneAPI\\debugger\\2024.0\\opt\\debugger\\bin\\gdb-oneapi.exe",
"MIMode": "gdb",
"preLaunchTask": "fpm_build_debug_main"
},
{
"name": "fpmTest Debug Unittest",
"type": "cppdbg",
"request": "launch",
"program": "${workspaceFolder}\\build\\ifx_BDDC0259BFB63FA8\\test\\Unittest.exe",
"args": [""],
"stopAtEntry": false,
"cwd": "${workspaceFolder}",
"miDebuggerPath": "gdb.exe",
"MIMode": "gdb",
"preLaunchTask": "fpm_build_debug_test"
},
]
}
task.json
{
"version": "2.0.0",
"tasks": [{
"label": "fpm_build_release",
"type": "shell",
"command": "fpm build --compiler ifx --profile release"
},{
"label": "fpm_build_debug_main",
"type": "shell",
"command": "fpm build --verbose --compiler ifx --profile debug"
},{
"label": "fpm_build_debug_test",
"type": "shell",
"command": "fpm build --tests --compiler ifx --profile debug"
}
]
}