How to find, open and view ".h" libs?

Dear all.

How (where) to find libs used by the main.cpp program? I mean those ones called with "#include <abcd.h>.

I’ve been searching for them in Finder, but some aren’t even found.

How are they stored in local drive? Or aren’t?

Would it be possible to have them available in “> libs” folder in workspace?

That’d be perfect to read and understand their classes and other properties.

It would save me a lot of time. Usually I’ve been browsing the internet as a puzzle to understand thigs that are probably inside my own computer.


Look at the .vscode/c_cpp_prroperties.json file, it tells the IntelliSense system all the folders where header files will be searched for. The only folders missing there are the toolchain-builtin files (like e.g., stdint.h, stdio.h, …).

For an ESP32 project, the sources and header files are stored

  • in the Arduino-ESP32 package, default C:\Users\<user>\.platformio\packages\framework-arduinoespressif32
    • that includes the cores/esp32 folder, tools\sdk\include and all built-in libraries you use in the project from libraries
  • the toolchain package, standard C:\Users\<user>\.platformio\packages\toolchain-xtensa32
  • any libary you specify via lib_deps will be stored at .pio\libdeps\<env>
  • the project folder’s lib/ libraries
  • the project folder’s include/ folder

In VSCode, you can Ctrl+Click on a #include <some_header.h> line to see where the file leads to.

Thank you Max

“.vscode/c_cpp_prroperties.json” found inside project’s folder. Huge file!

In “cores\esp32” folder as well as in “tools\sdk\include” I can find many libs, but they look like built it ones.

Folder “.pio” found inside project’s folder

Project folder’s lib/ and include/ contains only a README file each.

I’d say this is key! The “dream click” I’ve been looking for.

Im Mac OS: Option+click.

Thank you very much.