Skip to main content
Associate
August 12, 2026
Solved

STM32CubeIDE Debug Problem with MacOS

  • August 12, 2026
  • 2 replies
  • 45 views

I'm using a Macbook Air M5. I downloaded the STM32CubeIDE 2.2.0 macOS (Apple Native) version to my computer. After importing my projects, I tried to debug. It connects to the ST-Link and performs the necessary operations. Then, when debugging is ready, I start the debug and get this error: GdbSession, Lost target connection, Exiting... GdbSession, Lost target connection, Exiting... I checked the permissions on my Mac and updated the STM Link version. 

Also, when I install the Mac (Apple Native) version of STM32CubeProgrammer, I can program the same board using the ST-Link. The port is visible. And interestingly, when I open the same project on my Windows computer, I can debug it without any problems using the same ST-Link.

Any advice on how to resolve this issue so I can debug directly from STM32CubeIDE would be greatly appreciated!

Thanks in advance for your help.

Best regards,

Best answer by hasanaydogdu

Hello, ​@Ghofrane GSOURI

Firstly really appreciate for your attention. I made all and also I realized in the startup section, the "exclude from build" option was selected. Removing it fixed the problem. I can now debug without any issues. 

2 replies

Ghofrane GSOURI
ST Technical Moderator
August 13, 2026

Hello ​@hasanaydogdu 

Let’s first try creating a new workspace, re-importing the project, and then deleting and recreating the debug configuration to rule out any corrupted workspace or launch settings. If the issue still occurs after that, please check the CubeIDE Console and Error Log for more detailed messages, as they can help identify whether the problem is coming from the debugger configuration or the ST-Link GDB server.

if Error log is not visible, go to Window -> Show View -> Other... and search for Error Log. 

I will be waiting for your feedback.

THX

Ghofrane

To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.
hasanaydogduAuthorBest answer
Associate
August 14, 2026

Hello, ​@Ghofrane GSOURI

Firstly really appreciate for your attention. I made all and also I realized in the startup section, the "exclude from build" option was selected. Removing it fixed the problem. I can now debug without any issues.