I'm using VSCode + Platformio for debugging right now with a custom debug tool setup (https://docs.platformio.org/en/latest/plus/debug-tools/custom.html). The thing is, when closing a debug session, platformio seems to forcefully close down the debug server. This means the config file at .bloom/settings.json isn't saved and bloom is forcefully quit. Not ideal.
But I found out that platformio does run the GDB command pio_reset_run_target (if it exists) upon exiting the debug session. So this gives an opportunity for bloom to close gracefully by defining this command as follows:
define pio_reset_run_target
monitor exit
end
Unfortunately, I found out monitor exit doesn't exist :/
This is why I would suggest adding these two commands:
monitor save - Saves the current configuration to .bloom/settings.json and wait for it to be saved.
monitor exit and monitor quit - Close bloom gracefully, waiting until it's fully closed. This should also make gdb detach from the remote (bloom).
I'm using VSCode + Platformio for debugging right now with a custom debug tool setup (https://docs.platformio.org/en/latest/plus/debug-tools/custom.html). The thing is, when closing a debug session, platformio seems to forcefully close down the debug server. This means the config file at
.bloom/settings.jsonisn't saved and bloom is forcefully quit. Not ideal.But I found out that platformio does run the GDB command
pio_reset_run_target(if it exists) upon exiting the debug session. So this gives an opportunity for bloom to close gracefully by defining this command as follows:Unfortunately, I found out
monitor exitdoesn't exist :/This is why I would suggest adding these two commands:
monitor save- Saves the current configuration to.bloom/settings.jsonand wait for it to be saved.monitor exitandmonitor quit- Close bloom gracefully, waiting until it's fully closed. This should also make gdb detach from the remote (bloom).