Sorry if this isn't the place to ask about Wokwi stuff. I was just hoping one of the big brains here could let me know what might be going on....
So I have a little project. I built the exact same thing on a breadboard. Using the exact same code in VS Code. For some reason on Wokwi it does...welp...absolutely nothing. While the real life project works perfectly as intended. I wanted to have the simulator so I could try other ideas without plugging wires and components. Anyway I was thinking about joining the Wokwi club. But if half the proper things ya make there just won't work...what's the sense lol. Here's a link to the project.
The Arduino Uno is compiled and simulated the fasted in Wokwi. For simple projects with leds and buttons you can use the good old Arduino Uno (Arduino Uno R3) in Wokwi.
Wokwi does not care about currents or voltages and there is unlimited power. But for educational and entertainment purposes, I suggest to add resistors to the leds.
That is one sure way to destroy an Arduino, the LEDs, or both, although the circuit may work for a little while. Also, the button input is connected to Vcc, not the button.
Wokwi is telling you that your circuit (copied below) does not work.
The button is connected to VCC. Please take note of the big up arrow labeled VCC and where it's connected to. Your "fixed" image made exactly 0 changes. Electrically it's exactly as I had it originally. I don't really care if 'virtual LED's' blow out (which they won't anyway). Which is why I didn't bother including resistors on the sim. You missed my entire point. I have this exact circuit built same pins same parts same code. It works in my real life build but not on the Wokwi sim. The only difference is my actual ESP32 is devkit V1. The linked example is V4. I changed it in the diagram.json to use V1 and it still doesn't work. From everything I've read the V1 and V4 devkits are 1 for 1 pin compatible.
And p.s. You're "fixed" example doesn't work either. I also tried that before I posted even though I knew it wouldn't make a difference.
OK I see what went wrong in the sim. But just to show you it does in fact work as I had it wired before in real life. Here are two images. The program is running and working when I took the pics. Ignore the 2 extra switches. I was just experimenting with those and didn't remove. And yes in real life I do have resistors on the LED's.
Your circuit on the breadboard is 100% okay. You only had to copy that to Wokwi
On the breadboard, the resistor keeps the input pin high, and the button connect the input to GND, making it low when pressed.
The voltage for the pullup resistor should be 3.3V, since that is the maximum voltage for an input pin (in theory, there is a circuit in the ESP32 chip to avoid immediately damage).