Showing results for 
Search instead for 
Did you mean: 

STM32CubeIDE Cannot run program "gdb": Launching failed


I'm sure it's something silly and I can't believe I'm the only person who has seen this message but searching this site doesn't yield any clues. Can someone point me to what I am setting up wrong, presumably in the Debug Configuration menu ?

ST Employee

Could be quite a few things. Could you activate the gdb server log in the "Debugger" tab there's a "Log to file:" that you can click and then paste here.

Mike Hill
Associate II

0690X00000AriqlQAB.pngI am having the same problem on a project I converted from Atollic TrueStudio 9.1.0. It compiles just fine, but I can't debug now.

Where exactly is the option to log to a file? I can't find what you mean.

I did find this error log about the problem:

!ENTRY org.eclipse.cdt.dsf.gdb 4 5012 2019-11-05 16:04:49.906

!MESSAGE Error with command: gdb --version

!STACK 0 Cannot run program "gdb": Launching failed

   at org.eclipse.cdt.utils.spawner.Spawner.exec(

   at org.eclipse.cdt.utils.spawner.Spawner.<init>(

   at org.eclipse.cdt.utils.spawner.Spawner.<init>(

   at org.eclipse.cdt.utils.spawner.ProcessFactory.exec(

   at org.eclipse.cdt.dsf.gdb.launching.LaunchUtils.getGDBVersion(

   at org.eclipse.cdt.dsf.gdb.launching.GdbLaunch.getGDBVersion(

   at org.eclipse.cdt.dsf.gdb.launching.GdbLaunchDelegate.launchDebugSession(

   at org.eclipse.cdt.dsf.gdb.launching.GdbLaunchDelegate.launchDebugger(

   at org.eclipse.cdt.dsf.gdb.launching.GdbLaunchDelegate.launch(

   at org.eclipse.debug.internal.core.LaunchConfiguration.launch(

   at org.eclipse.debug.internal.core.LaunchConfiguration.launch(

   at org.eclipse.debug.internal.ui.DebugUIPlugin.buildAndLaunch(

   at org.eclipse.debug.internal.ui.DebugUIPlugin$



Senior II

I get errors like that when the debugger isn't connected and i try to start it. Usually saying 'Doh!' and plugging the debugger into the target board and turning it on fixes everything.​

Mike Hill
Associate II

That's definitely not my problem. It has something to do with the new installation of the IDE. My old Atollic version still works just fine.


As the original creator of this thread, and just for the record, after six months I still haven't solved this problem. Compilation works but debugging in CubeIDE just doesn't ... at least on my system.

Looks like you don't have it pointed to the correct exe. In the "Debugger" tab give full path of the gdb.exe(Windows machine) of the cross compiler that you might have installed as the "GDB command".

For me it is "C:\Program Files (x86)\GNU Tools Arm Embedded\7 2018-q2-update\bin\arm-none-eabi-gdb.exe"

You are correct, but I think the underlying issue is that Atollic installed gdb.exe and STM32CubeIDE does not. At least not for me. I have searched the install path and I can't find it. I assumed it would install everything that was needed just like Atollic did.

Associate II

I think @Community member​ 's problem is solved, can you check if you are also facing the same issue?

Mike Hill
Associate II

Actually it did not fix my problem. I pointed to gdb.exe from a previous installation and it gave me different errors. The gdb.exe is supposed to be installed with the IDE and for some reason on my machine it is not getting installed.