How to get complete code from arduino ide

I agree that it would be a very useful feature to be able to view the external source files. Arduino users tend to treat libraries and the hardware package files as black boxes but if they were easier to access then they could easily take a peek under the hood and find it's just more code similar to what they're already writing in their sketches. I've learned a lot from digging into the source code. I believe that if someone were to submit a pull request to the Arduino IDE adding this feature without harming the user experience (maybe a right click menu item would be better) the Arduino developers would welcome it. I just don't think it's their top priority to implement the feature themselves since the average Arduino user is not clamoring for it.

LED_BUILTIN is defined in the variants/{variant name}/pins_arduino.h under the active hardware package folder I showed you how to find in my last reply. {variant name} is defined by the build.variant property of the currently selected board in boards.txt. You'll note there is also a build.core property defined there, which determines the subfolder of the cores folder that is used for the selected board. I didn't mention that before because most hardware packages only use a single core library but the Arduino IDE does provide the ability for multiple core libraries if a package author needs it.