Do this:
- Select File > Preferences from the Arduino IDE menus.
- Check the box next to "Show verbose output during: [] compilation.
- Click the OK button.
- Select the board you are interested in from the Arduino IDE's Tools > Board menu.
- Compile any sketch.
- Wait for the compilation to finish.
(it should be OK even if it fails) - Scroll up the black console pane at the bottom of the Arduino IDE window all the way to the top.
You should see a line that looks something like this in the output:
Using board 'generic' from platform in folder: C:\Users\<user name>\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\3.0.2
That is the location.