Timeout waiting for GDB server - debugging not reliable

I’m debugging a very basic project on an STM32G431 nucleo board using mbed studio.

The issue that I’m seeing is one where I’m able to run debug a few times until suddenly I can’t anymore, and the only fix right now is a full reboot of my machine. For example. I reboot my machine and I can debug once or twice, but if I hit the “stop” icon or the restart icon, eventually I will not be able to debug anymore.

The error I’m always inevitably seeing is “Timeout waiting for GDB server”. I have attempted everything reasonable; unplug/replug nucleo, restart mbed studio, open task manager and kill all python tasks, etc.

It seems like the tools eventually get into some weird state where they can no longer function. I have no reason to believe that this is at all related to the hardware.

This is a bit frustrating; hopefully it can be resolved.