cancel
Showing results for 
Search instead for 
Did you mean: 

STM32CubeIDE for VSCode debug error: Failed to get gdb version

ShienLin
Associate II

Hello,

I am using VSCode on Windows with the STM32CubeIDE for VSCode extension.

Before installing the extension, I had already installed and configured these tools separately on my system:

  • CMake
  • Arm GNU Toolchain (arm-none-eabi-gcc, arm-none-eabi-gdb)
  • clangd

After installing the STM32CubeIDE for VSCode extension, build works, but debug fails to start. I get the following popup error:

bound doStepStartGdbClientDebug Failed: Failed to get gdb version.

I would like to ask whether this issue may be related to how the extension detects GDB, conflicts with environment variables, or path priority when multiple toolchains are installed.

Observed behavior

  1. I already had a standalone ARM toolchain installed before installing the STM32CubeIDE for VSCode extension.
  2. After installing the extension, debug no longer starts correctly.
  3. The popup error is:
    bound doStepStartGdbClientDebug Failed: Failed to get gdb version.
  4. My current suspicion is that the extension is either:
    • not finding the correct arm-none-eabi-gdb, or
    • finding an incompatible GDB executable.

My questions

  1. When starting a debug session, does the STM32CubeIDE for VSCode extension use:
    • a bundled GDB,
    • the GDB from a local STM32CubeIDE installation,
    • or the GDB found in the system PATH?
  2. If there are multiple ARM toolchains installed on the system, what is the recommended way to force the extension to use one specific GDB path?
  3. Is this a known issue related to any of the following?
    • multiple arm-none-eabi-gdb executables in PATH
    • environment variable priority changes after installing CMake / clangd / other tools
    • the extension invoking a non-ARM GDB by mistake
    • the selected GDB executable failing to start because of missing DLL dependencies
  4. Is there a recommended minimal configuration to make sure STM32CubeIDE for VSCode uses only the ST-recommended toolchain and debug components?

Environment

  • OS: Windows
  • IDE: VSCode
  • Extension: STM32CubeIDE for VSCode
  • Separately installed tools: CMake, Arm GNU Toolchain, clangd
  • Failure point: immediately after clicking Debug
  • Build status: build works, issue happens at debug startup

Error message

bound doStepStartGdbClientDebug Failed: Failed to get gdb version.

addition:create from 

ShienLin_0-1776141468005.png

 

If needed, I can provide:

  • launch.json
  • settings.json
  • output of arm-none-eabi-gdb --version
  • full VSCode debug log
  • STM32CubeIDE for VSCode extension logs

Thank you.

5 REPLIES 5
ShienLin
Associate II

ShienLin_0-1776141976974.png

 

ShienLin_0-1776143756341.png

success by add my gbd path
How to solve it rootly

 

Hi @ShienLin,

The error message indicates that the tcp ports 61234 and/or 61235 are already used (or reserved by the OS).

What you can do is either to identify the process using this port and stop it, or define another unbound port in your launch.json using serverPort attribute:

JulienD_0-1776155312419.png

 

 

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.

ShienLin_0-1776157422731.png

Same

 

Hi @ShienLin,

There are two concepts here.

  • the GDB client

If the gdb attribute is not set in the debug configuration, then the adapter will use the GDB client provided by an ST bundle. To know which ST-provided GDB bundle version is used by the project, check the project’s Bundle Manager view (STM32Cube activity bar -> STM32Cube Bundles Manager view in left panel).
Of course it is still possible to use your own GDB client by setting the gdb attribute as you did.

  • Second: the server port

By default, the port for the ST-Link GDB Server is 61234. It can be changed via serverPort.

 

In your case, port 61234 seems to be used by another process. So, to use your GDB client, you need to set both the gdb attribute and serverPort.

 

Kind Regards,
/Flo

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.