Switching PlatformIO Project Environment menu not showing all environments

PlatformIO V5.2.5 in VSCode V1.65.0 (Mac Universal).

I have three environments defined in platformio.ini.
The switch environment menu (to the right of the terminal button in the bottom status bar), only shows two of them.
Actually, clicking the menu displays a combo-box at the top of the window. That combo-box shows only two of the environments. Typing the name of the third environment into the combo-box’s text area has no effect.

Changing the order of the environments in platformio.ini has no effect.

$ pio project config cli command shows all three.

Suggestions?
TIA
Dave

Please post the platformio.ini.

Sure. Here you go:

; PlatformIO Project Configuration File
;
;   Build options: build flags, source filter
;   Upload options: custom upload port, speed and extra flags
;   Library options: dependencies, extra library storages
;   Advanced options: extra scripting
;
; Please visit documentation for the other options and examples
; https://docs.platformio.org/page/projectconf.html

[platformio]
description = "IoT Doorbell System"
default_envs = featherM4Development

[env]
framework = arduino
monitor_filters = time
build_flags =
    -D HAVE_ETHERNET
lib_deps =
    arduino
    arduino_libraries/Ethernet@^2.0.0
    Adafruit Zero DMA Library
    ; arcao/Syslog@^2.0.0
    SPI

[env:featherM4Release]
platform = atmelsam
board = adafruit_feather_m4
upload_port = /dev/cu.usbmodemFA2501
monitor_port = /dev/cu.usbmodemFA2501

[env:featherM4Development]
extends = env:featherM4Release
build_flags =
    -D DEVELOPMENT_MODE
    
[env:featherM4Trace]
extends = featherM4Development
build_flags =
    -D ENABLE_FUNCTION_TRACING

It should be extends = env:featherM4Development here, but this still doesn’t cause the merge ( accumulation, of build_flags which you seem to want, let me slightly rewrite it.

Please try

[platformio]
description = "IoT Doorbell System"
default_envs = featherM4Development

[env]
framework = arduino
monitor_filters = time
build_flags =
    -D HAVE_ETHERNET
lib_deps =
    arduino
    arduino_libraries/Ethernet@^2.0.0
    Adafruit Zero DMA Library
    ; arcao/Syslog@^2.0.0
    SPI

[env:featherM4Release]
platform = atmelsam
board = adafruit_feather_m4
upload_port = /dev/cu.usbmodemFA2501
monitor_port = /dev/cu.usbmodemFA2501
; can also be left out since nothing is added, just for clarity
build_flags = ${env.build_flags}

[env:featherM4Development]
extends = env:featherM4Release
; use previous build flags and add on them
build_flags =
    ${env.build_flags}
    -D DEVELOPMENT_MODE
    
[env:featherM4Trace]
extends = env:featherM4Development
; refer to the extended environment's build flags since 
; we're overriding build_flags again
build_flags =
    ${env:featherM4Development.build_flags}
    -D ENABLE_FUNCTION_TRACING

Duh. Bone-headed mistake on my part. Thanks for the correction.

Though in hindsight, it is unusual to declare “arduino” as a library, this will cause it to search for that in the https://registry.platformio.org/, and might grab a library which you don’t want. The framework (arduino) is always included via framework = arduino, no need for a library declaration thereof.

That’s awesome. Thanks for taking the time to show me this.

I’ll remove arduino from lib_deps.
Thanks again.