Piodebuggdb: struggling to set up debuging via Debug Adapter Protocol (DAP) or similar

Hi,

I’m doing a bit of ESP32 development using PlatformIO Core and Neovim. I would love to integrate debugging into my editor/workflow (ideally using the Debug Adapter Protocol (DAP)), but so far have failed to do so.

To the best of my understanding, I’d have to let the debugger speak DAP. For stock GDB, I can do this by simply calling

gdb --interpreter=dap

however, the debugger that comes with the espressif32 platform doesn’t seem to speak DAP:

$ piodebuggdb -x .pioinit --interpreter=dap
Interpreter `dap' unrecognized

I’m a bit puzzled by this because I assumed VSCode would do the same under the hood.

Relevant (I think) part of my ini file:

[env:myesp]
platform = espressif32
board = az-delivery-devkit-v4
framework = arduino
debug_tool = esp-prog

Other things I’ve tried:

I tried using :Termdebug to get Neovim to speak directly to piodebuggdb, but its output seems too different from what :Termdebug is expecting and there’s error messages galore.

I’ve also tried using GDB’s TUI, but again, piodebuggdb doesn’t seem to like that either (The output is a terminal):

$ piodebuggdb -- -x .pioinit --tui
Cannot enable the TUI when output is not a terminal

Is there anything I can do to get debugging integration with my editor (or at least a TUI) working?