when in a debug session if i click the restart icon in the debug tool bar( green CCW arrow) a new build is started( and then subsequently fails). I have to stop debugger and then start debug which does a build and download again…very time consuming.
Is there a way to change this behavior?
In the debugger sidebar you can change the configuration to “PIO Debug (*project name) Skip Pre-Debug” and see if that helps.
With what error are builds failing exactly? If you didn’t change anything in code or
platformio.ini then it shouldn’t fail.
Thank you! … “Skip Pre-Debug” seems to have fixed the problem… RTFM
BTW i switch between debug/release configs and this forces a very long rebuild of Arduino and ESPIDF libs is there away to avoid this? i rarely need to step into those libs.when debugging.
platformio.ini build will always trigger a full rebuild if you’re doing that.
But when you’re debugging (without “Skip Pre-Debug”) PlatformIO will build the project automatically in debug-mode (equivalent to setting
build_type = debug in the
platformio.ini), so you shouldn’t need to actively switch between these settings.
So I’d actually recommend that if you want to debug something, as a prerequisite you don’t have any
build_type directives in the
platformio.ini and use the normal “PIO Debug (project)” configuration. Changing the code or restarting debugging without a
platformio.ini change should lead to only a partial project rebuild and quicker debugging cycles.