Error including <Arduino.h>

When comparing your log with a similar log on my machine (for basically the same ESP32 project), its very similar. But one thing pops out. Your log contains these lines (line 327 – 332):

  include: /home/colton/include
  include: /usr/lib/gcc/x86_64-linux-gnu/7/include
  include: /usr/local/include
  include: /usr/lib/gcc/x86_64-linux-gnu/7/include-fixed
  include: /usr/include/x86_64-linux-gnu
  include: /usr/include

While mine log contains these lines in exactly the same place (related to analyzing file main.cpp):

  include: /home/me/.platformio/packages/toolchain-xtensa32/xtensa-esp32-elf/include/c++/5.2.0
  include: /home/me/.platformio/packages/toolchain-xtensa32/xtensa-esp32-elf/include/c++/5.2.0/xtensa-esp32-elf
  include: /home/me/.platformio/packages/toolchain-xtensa32/xtensa-esp32-elf/include/c++/5.2.0/backward
  include: /home/me/.platformio/packages/toolchain-xtensa32/lib/gcc/xtensa-esp32-elf/5.2.0/include
  include: /home/me/.platformio/packages/toolchain-xtensa32/lib/gcc/xtensa-esp32-elf/5.2.0/include-fixed
  include: /home/me/.platformio/packages/toolchain-xtensa32/xtensa-esp32-elf/include
  include: /home/me/.platformio/packages/toolchain-xtensa32/xtensa-esp32-elf/sysroot/usr/include

So it looks like the wrong compiler is picked in your case (64 bit x86 instead of 32 bit xtensa).

I’m not sufficiently familiar with the inner workings of VSC and PIO. Maybe somebody else has an idea what the reason could be?