For debuging to work in VS Code export mbed project with the debug flag For this installing the mbed CLI is required which is done with pip install mbed export --profile debug For openOCD use these paths /usr/share/openocd/scripts/board/st_nucleo_f4.cfg /usr/share/openocd/scripts/interface/stlink-v2-1.cfg or stlink-v2.cfg