# Re: Is there a way to get the IDE to open .cpp files?

**URL:** <https://forum.arduino.cc/t/re-is-there-a-way-to-get-the-ide-to-open-cpp-files/1346626>\
**Category:** IDE 2.x\
**Created:** [December 23, 2023, 7:39pm UTC](https://forum.arduino.cc/t/re-is-there-a-way-to-get-the-ide-to-open-cpp-files/1346626 "2023-12-23T19:39:09Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![ptillisch](https://avatars.discourse-cdn.com/v4/letter/p/ad7895/32.png) [@ptillisch](https://forum.arduino.cc/u/ptillisch)\
**Post date:** [December 23, 2023, 7:39pm UTC](https://forum.arduino.cc/t/re-is-there-a-way-to-get-the-ide-to-open-cpp-files/1346626/1 "2023-12-23T19:39:09Z")

</div>

Hi @Delta_G. You can create a `.ino` file with name matching the folder name in the folder that contains the library code files. You can then open the `.ino` file in Arduino IDE like any other sketch and edit the library code files in the IDE.

---

<div class="post-metadata">

**Author:** ![JohnRob](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/johnrob/32/253560_2.png) [@JohnRob](https://forum.arduino.cc/u/JohnRob)\
**Post date:** [December 23, 2023, 8:12pm UTC](https://forum.arduino.cc/t/re-is-there-a-way-to-get-the-ide-to-open-cpp-files/1346626/2 "2023-12-23T20:12:58Z")

</div>

@ptillisch is the expert, but I would look at making an INO file with your .h and .cpp files as included. Even if there is no other code the .h and .cpp files will be brought up as tabs, and I believe you can edit them as well.

---

<div class="post-metadata">

**Author:** ![KurtE](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/kurte/32/1246572_2.png) [@KurtE](https://forum.arduino.cc/u/KurtE)\
**Post date:** [December 24, 2023, 1:08pm UTC](https://forum.arduino.cc/t/re-is-there-a-way-to-get-the-ide-to-open-cpp-files/1346626/4 "2023-12-24T13:08:46Z")

</div>

> [@ptillisch](#):
>
> Hi @Delta_G. You can create a `.ino` file with name matching the folder name in the folder that contains the library code files. You can then open the `.ino` file in Arduino IDE like any other sketch and edit the library code files in the IDE.

That sounds like a nice trick...

But wondering about how to open library files and/or core files in the IDE to use in the debugger.

Sometimes I can get the files, by setting a breakpoint somewhere in my sketch and walk into or back out into the library, which opens the file. But sometimes there are no direct ways for this.

Like trying to debug USB Hub code, where you never call the hub, but instead maybe call into devices that are plugged into the hub...

---

<div class="post-metadata">

**Author:** ![ptillisch](https://avatars.discourse-cdn.com/v4/letter/p/ad7895/32.png) [@ptillisch](https://forum.arduino.cc/u/ptillisch)\
**Post date:** [December 24, 2023, 3:04pm UTC](https://forum.arduino.cc/t/re-is-there-a-way-to-get-the-ide-to-open-cpp-files/1346626/5 "2023-12-24T15:04:22Z")

</div>

> [@KurtE](#):
>
> wondering about how to open library files and/or core files in the IDE to use in the debugger.

I think this will work:

1. Press the **Ctrl** + **Shift** + **P** keyboard shortcut ( **Command** + **Shift** + **P** for macOS users) to open the "Command Palette".  
A menu will appear on the editor toolbar:  
 ![image](https://europe1.discourse-cdn.com/arduino/original/4X/d/6/d/d6d06cdc2510d164ddbdde759fe56e215a747352.png)
2. Select the " **Toggle Explorer View**" command from the menu.  
**ⓘ** You can scroll down through the list of commands to find it or type the name in the field.  
The " **EXPLORER**" view will open in the Arduino IDE left side panel.
3. Click the **●●●** icon in the toolbar for the sketch's section of the " **EXPLORER**" view.  
A menu will open.
4. Select " **Add Folder to Workspace...**" from the menu.  
The " **Add Folder to Workspace...**" dialog will open.
5. Select the folder that contains the files in which you want to set breakpoints from the " **Add Folder to Workspace...**" dialog.
6. Click the " **Select Folder**" button.  
The folder will be added in the " **EXPLORER**" view.
7. Click on a file in which you want to set a breakpoint.  
The file will open in a tab in the editor view.

---

<div class="post-metadata">

**Author:** ![KurtE](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/kurte/32/1246572_2.png) [@KurtE](https://forum.arduino.cc/u/KurtE)\
**Post date:** [December 24, 2023, 4:49pm UTC](https://forum.arduino.cc/t/re-is-there-a-way-to-get-the-ide-to-open-cpp-files/1346626/6 "2023-12-24T16:49:15Z")

</div>

Thanks, that appears to work

---

<div class="post-metadata">

**Author:** ![system](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/system/32/1140315_2.png) [@system](https://forum.arduino.cc/u/system)\
**Post date:** [July 23, 2025, 9:53pm UTC](https://forum.arduino.cc/t/re-is-there-a-way-to-get-the-ide-to-open-cpp-files/1346626/7 "2025-07-23T21:53:04Z")

</div>

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.
