Skip to main content
Senior III
April 9, 2025
Solved

GDB in TouchGFX has a bug in VSCode and won't set breakpoints

  • April 9, 2025
  • 2 replies
  • 486 views

It turns out the GDB shipped with TouchGFX 4.25.00 has an issue where it can't set the breakpoint in VSCode when the software is running.

The only workaround is to set the breakpoints before launching the debug.

The issue is reported it https://github.com/microsoft/vscode-cpptools/issues/13191#issuecomment-2787932838

To fix the issue you can use the GDB shipped with the latest version of MYSYS2 https://packages.msys2.org/packages/mingw-w64-x86_64-gdb

You just run on the terminal pacman -S mingw-w64-x86_64-gdb 

In the launch.json you set "miDebuggerPath": "C:/msys64/mingw64/bin/gdb.exe", (or the location where it has been installed) and in the task.json in "env": {"PATH": "C:/msys64/mingw64/bin;"}

 

Best answer by nico23

The GDB shipped with TouchGFX has a bug that won't let you set a breakpoint while debugging in VSCode 

The workaround (not a fix) is to install MYSYS2 in your system. After that, you can run the MYSYS2 cmd console and install gdb with:

pacman -S mingw-w64-x86_64-gdb

At this point, in the launch.json, you can use "miDebuggerPath": "C:/msys64/mingw64/bin/gdb.exe"

2 replies

ST Employee
April 11, 2025

Hello @nico23,

Thanks for your workaround, I will talk to the team about that.
You use VScode to debug on target ?

 

BR,

nico23Author
Senior III
April 11, 2025

Hi Louis,

No, to debug the target I'm using CubeIDE.

I'm using VSCode to debug the Simlutor on my machine as using Visual Studio is not suitable for me

nico23AuthorBest answer
Senior III
November 28, 2025

The GDB shipped with TouchGFX has a bug that won't let you set a breakpoint while debugging in VSCode 

The workaround (not a fix) is to install MYSYS2 in your system. After that, you can run the MYSYS2 cmd console and install gdb with:

pacman -S mingw-w64-x86_64-gdb

At this point, in the launch.json, you can use "miDebuggerPath": "C:/msys64/mingw64/bin/gdb.exe"