CLI debugging? not uploading to target?

Hi
I try to make working debugging in VIM using termdebug
i tried to start a debug session using

pio debug 
pio debug --interface=gdb --load-mode=modified --project-conf=platformio.ini

first line did recompile in debug… OK
second line did start a GDB> prompt… but no upload (tried without --load-mode, no luck)

tried debugging with vscode… everything works…
so my question is what is the process???

thanks and regards

You have to do -- -x .pioinit per documentation.

1 Like

ok, this isn’t clear in the documentation and since there is no .pioinit file in current directory, and that the – looked as an exemple to pass additional args to gdb…

but seems that it worked.
I found also that programming can be done by

 platformio run --target upload --environment  <TARGET>
1 Like