I can restart it by plugging in/out the USB cable or pressing the reset button on the board, but is there a way to do that in software within the PlatformIO?
I could click the “Upload” button again, and that seems to be resetting the board, but it uploads the same code again so it takes a long time (and it wears the flash storage, probably). The board I am using is NodeMCU V3. I thought “Start Debugging” will reset the board and run the code from the beginning, but it seems that debugging is not supported on ESP-12E.