Debug build (-g3) should be separate from Release


#1

I noticed that when I use the unified debugger and the “standard” build back and forth then Pio is deleting the build in the .pioenvs and compiling all sources over again (with debug symbols . -g3 or without). The ‘proper’ behavior would be to have separate build dirs for compiler vs debugger optimization.

I would like to start working on this and contribute to the project.
I have a clone here: https://github.com/nargetdev/platformio-core

If anybody has worked in this domain or has any advice would be much appreciated!!

Thanks


#2

You need to have 2 different build environments in platformio.ini:

[env:debug]
platform = ...
build_flags = -D DEBUG=1

[env:release]
platform = ...
build_flags = -D RELEASE=1