Warning! Undefined pio_reset_halt_target command

What does this mean and why does it appear when debugging?

Probably that you have modified the debug_init_cmds or use some custom debugging directives. pio_reset_halt_target is a GDB function definition that PlatformIO inserts in the GDB-client and it contains the debug-tool specific commands to halt the target.

See docs and code for the standard definition

Notice how the definitions can differ.

Thanks maxgerhardt for that information. Yes I have modified the debug_init_cmds and use some custom debugging directives to get my STLink to work with LPC chips. So I should define those in my platformio.ini file under debug_init_cmds I assume.
As you point out, these function definitions can differ a lot. How does one figure out what needs to be put in these functions? For instance, I’m currently using STLink for my debug tool, is there some pre-existing standard for that interface or is it a try and see what’s needed approach?

The function definitions in GDB_DEFAULT_INIT_CONFIG should apply to that if it gets used with OpenOCD, I think.