If you want to simulate code, many developers use the Wokwi Simulator alongside Proteus, as it has more robust native support for ESP32 firmware debugging.
The ESP32 library for Proteus allows you to design and simulate circuits using the powerful ESP32 microcontroller before moving to physical hardware. While Proteus cannot currently simulate WiFi or Bluetooth signals, you can still test input/output pins, interface with sensors, and verify your logic using the ESP32 Library . esp32 library proteus
client.flush();