You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Add a native compatibility shim for build_type=debug and debug_build_flags #36
PlatformIO's debug mode is a declarative feature, not just a pile of user flags. build_type = debug changes the build mode, strips existing optimization/debug flags, adds __PLATFORMIO_BUILD_DEBUG__, and applies debug_build_flags (defaulting to -Og -g2 -ggdb2 when not overridden).
PlatformIO source evidence
Build mode is derived from build_type / special targets: .cache/platformio-core/platformio/builder/tools/piobuild.py:47-57
Debug mode is activated during dependency processing: .cache/platformio-core/platformio/builder/tools/piobuild.py:118-128
Activity
zackees commentedon Apr 17, 2026
Closing this as completed on current main.
The native debug compatibility shim is already implemented:
PlatformIOConfigparsesbuild_typeanddebug_build_flagsincrates/fbuild-config/src/ini_parser.rsBuildContext::new()applies the debug path incrates/fbuild-build/src/pipeline.rswhenbuild_type == "debug"apply_debug_build_type()strips prior-O*/-g*, adds-D__PLATFORMIO_BUILD_DEBUG__, and appliesdebug_build_flagsCurrent regression coverage also matches the issue intent:
cargo test -p fbuild-config test_get_build_type_reads_debugcargo test -p fbuild-config test_get_debug_build_flags -- --nocapturecargo test -p fbuild-build test_apply_debug_build_type_replaces_opt_flags_and_adds_debug_definecargo test -p fbuild-build test_debug_mode_then_build_unflags_can_remove_debug_flags_againThose all pass on current
main, so the requested declarative debug subset is in place.