I am on linux primarily, and used Arduino IDE on Ubuntu Noble without major issue. I switched to arch for newer packages for other programs, and when I installed arduino-ide, it launches fine. However, I cannot see pin definitions, member functions, or any autocomplete results in any .ino files I create. They work for the example sketches but not any sketches I create myself.
Tried using wine/winetricks to run the windows version of the IDE but it crashes after loading.
I can compile sketches just fine, but it is a real hindrance to not be able to see the value of preprocessor definitions or even to autocomplete the member functions of classes. I would appreciate any help.
Uhh I'm not going to consider this solved because I still have no idea what happened or how to fix it if it happens again but after I installed wine/winetricks and arduino-ide for windows, and hwinfo for some reason I am now seeing all the information I wasn't. Didn't relaunch the app or reboot my computer or anything. I am going to look at my package manager logs real quick. I swear I didn't just make this post right after I saw the issue, I've been debugging this all day.
I'm not seeing anything related to arduino since I installed it (on the 4th), the issue seems to have solved itself for now, I fell asleep right after I installed wine-mono and iirc it still wasn't working until I installed hwinfo. It seems to still work after I kill and restart arduino-ide. I would really like to look into what caused this however.
I am unsure where to continue debugging from here. I don't want to consider this solved because I have no idea why it would randomly start working. I've been keeping all my packages up to date every time I use this computer, which is daily. Any help would still be appreciated.
That happens to me as well on my Mac. I have yet to notice a pattern, but some work some don't (Not my sketches, system or library)
I wonder if it has anything to do with the message I sometimes see lower left about indexing something?
Maybe, I know that the issue persisted after the indexing was done, so I don't know. If I were to guess I would say that the wine installation of arduino IDE somehow retrieved some dependencies that the native version didn't retrieve, and then now that the native version has those dependencies it can run fine.
Though I would be surprised if that was the case or at least the whole story, as I haven't found any similar issues online. It could have been a fluke, maybe I interrupted some startup routine that never got run again for the native version.
Wait, I think I maybe figured it out. I need someone from Arduino Team to confirm but I think the issue just happened again when I lost internet connection. The IDE stopped showing me info from included libraries until I killed and restarted the IDE when I regained connection.
I'll update this if it happens again.
One of the heavyweights here told me about an option to enable keyboard control of the 'suggestions'. On my Mac it's control spacebar, windows is Cmd spacebar? also Linux?
To enable, bring up the command palette which for me is shift command p, not sure about windows/linux. Another useful keystroke is show parameters which is shift command space for Mac, Attached are what they look like.
When the issue is occurring it just shows suggestions based on text in the file I am currently editing. For example, if I have a variable foo and type f and then CTRL+SPACE it suggests foo, however if I #include <Wire.h> and then type Wire. and then CTRL+SPACE it suggests nothing related to the Wire library or class.
I just tried with Wire. I am not real familiar with what I should see but looking at an examp[le I can see there are a couple that start with b.
Are you on a Mac? Control on a Mac is NOT the same on a Win/Linux, I think it's Command.
Hey @ptillisch . Could you please check the new posts on this thread? I am still suffering from this issue. I have tried a full reinstall, purging all arduino directories. I have tried changing the target board, I have tried creating a new file and copying the code from the problem file to the new one, I have tried everything I can think of save for reinstalling my distro, which I doubt would help as I have had no issue with any other programs.
I triggered the suggestion boxes on both images with the keyboard. I waited until the indexing was done for both images. Thanks for the quick reply, by the way
The "context-aware" features (e.g., autocomplete, "IntelliSense", suggestions, "Go to Definition") only work for objects from a library after one of these events occurs following the time of the addition of the #include directive for a library's header file in a sketch:
The sketch is opened in Arduino IDE
A different board is selected in the Arduino IDE menus
The sketch is compiled
The reason for the deferred awareness of objects from libraries compared to the awareness of other objects in the sketch (which is updated after every edit to the code) is that the awareness of library objects is dependent on a process known as "library discovery", where Arduino IDE scans all installed libraries for a header files matching the #include directives of the sketch program and picks which libraries to add to the compiler's "search path". That "library discovery" process is somewhat resource intensive. The overhead of that resource usage is insignificant when it is done as part of the occasional manually triggered compile operation, but more significant when it comes to the continuous processing that is done to support the "context-aware" features. The developers decided to change to this "deferred discovery" approach for the "context-aware" feature support in response to user complaints that the previous approach was too heavy for lower spec PCs.
Thank you for the response, I have tried all three of these things. The result is that now neither sketch shows the intended behavior on bringing up the autocomplete menu.
I am going to install a windows VM at this point because I cant get it to work on WINE either (crashes to desktop at best) and any posts regarding getting ide v2 working on WINE is quickly (and rudely) shut down by another forum member. I will post here again if anything notable happens.
I just did a small test, before compile no work, after compile it works. BUT, my memory (highly flawed at 82) is it is flaky, sometimes works, sometimes does not. Is that 'Index' thing not involved also?