ESP32 Devkitv1 help

If your board is DOIT ESP32_DEVKIT_V1, you have to select correspondingly. Selecting ESP32_DEV, etc. will cause the board to reboot like that.

You can also have to add delay(1) in the loop(), such as

void loop()
{
  ...

  delay(1);
}