I do not know where I am now as I doubt myself and have been making sketch changes and still nothing works; not even the Blink program.
Sometimes I hate electronics/programming and do not know why I do it I am close to selling up and getting another hobby; perhaps I should take up basket weaving.
EDIT: Out of interest the last time I had a problem like this I installed the "Arduino ESP8266/ESP32 Exception Stack Trace Decoder" But could not get that to work; I can't remember the exact reason it would not work. Something about not being able to find a file. I have the file in multiple places around my Windows setup now as recommended by various websites and it still will not work If anyone knows of a way to find out where the trace decoder is actually looking for the file it would be helpful.
Just had a look and: ERROR: xtensa-lx106-elf-gdb.exe not found!