If the PlatformIO serial monitor show nothing when using ESP32CAM... put these in platform.ini:
[env:esp32cam]
platform = espressif32
board = esp32cam
framework = arduino
monitor_dtr = 0
monitor_rts = 0
monitor_speed = 115200
The important setting is to disable DTR and RTS. But these settings has to be before the monitor_speed.
Just in case other settings need to be set, it can be done this way:
[env:esp32cam]
platform = espressif32
board = esp32cam
framework = arduino
board_build.mcu = esp32
board_build.f_flash = 80000000L
board_build.f_cpu = 240000000L
board_build.flash_mode = dio
monitor_dtr = 0
monitor_rts = 0
monitor_speed = 115200