Skip to main content
Visitor II
October 12, 2026
Question

ailed to execute MI command: target remote localhost:61234

Dear all,
I am using an application on the NUCLEO-F401RE board. I wrote and successfully compiled a program (with no errors), but I am encountering an error during debugging with the message: "Failed to execute MI command: remote target localhost:61234".The ST-LINK (ST-LINK GDB server) is configured as the debug probe and SWD interface.I have replaced the communication cables and reinstalled the STM32CubeIDE software. It used to work normally.
The log is attached below:

3 replies

ST Technical Moderator
October 14, 2026

Hello ​@Marcelo_Candido 

I suggest that you use STM32CubeProgrammer to verify that the ST-LINK probe is correctly detected, that the target device can be connected successfully via SWD, and that the ST-LINK firmware is up to date. These checks help determine whether the debug issue is related to the debug interface and hardware connection or to the project/debug configuration.

BR, Souhaib

To give better visibility on the answered topics, please click on 'Best answer' on the reply which solved your issue or answered your question.
Andrew Neil
Super User
October 14, 2026

 

 

 

Presumably, you are using the onboard ST-Link of the Nucleo board - yes?

Are you sure that all links and solder bridges are correctly configured for that?

What version of CubeIDE are you using, and on what platform?

 

It used to work normally

So what has changed since then ?

 

As ​@Souhaib MAZHOUD said, also try CubeProgrammer.

 

Failed to execute MI command: remote target localhost:61234

That does not appear anywhere in the posted log file.

Please show the actual message(s) you see in the IDE - you can copy & paste text from the ‘Console’ window

A complex system that works is invariably found to have evolved from a simple system that worked.A complex system designed from scratch never works and cannot be patched up to make it work.
LaurentL
ST Employee
October 15, 2026

Hello,

The Program Counter has a strange value.

It is better to use the “connect under reset” mode in debug configuration to be able to take control on an application (previously programmed) that have issue(s).

 

If still not working, use cube programmer to mass erase the device.

 

Rgds,

Laurent

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.