I find the "peek definition" (ALT F12) and the feature where if you hover over a variable it gives you definitions very, very useful. I am debugging a ESP32-C3 project. Today, I did a "copy project" to do some significant code revisions. I have done this many times--every day or two. Today, the new project doesn't seem to have any of the autocomplete, peek definition, hover suggestions working, at all. Open the old project, side by side, they work fine. The new project compiles, loads, etc. but has some bugs--which I entirely expected. Lack of these features is a problem.
Both projects have "Editor Quick Suggestions" enabled.
Clicking on "peek definiton" gets me " no definition found for...."
I know it has to be something dumb.
Suggestions?
Thanks in advance.
Using IDE 2.2.1.
Not necessarily. Mostly it works for me, except when it doesn't. I have not been able to find out what the problem is
Thanks, makes me feel better, but I have a predilection for doing dumb things.
Hi @lichau4340. It might be possible to find some clues in the debug logs that are produced by the "Arduino Language Server" tool used by Arduino IDE for these "context-aware" features.
This procedure is not intended to solve the problem. The purpose is to gather more information.
A. Enable Language Server Logging
- Use the Ctrl/⌘+Shift+P keyboard shortcut to open the "Command Palette" in Arduino IDE.
- Select the "Preferences: Open Settings (UI)" command from the "Command Palette".
The "Preferences" tab will now open in the editor panel. - In the "Search Settings" field, type
arduino.language.log
- Under the "Arduino > Language: Log", section, check the box next to "☐ True if the Arduino Language Server should generate log files into the sketch folder. Otherwise, false. It's false by default."
- Close the Preferences tab by clicking its X icon.
B. Gather Logs
- Open the problematic sketch in Arduino IDE.
- Verify that the language server-based features are not working in the sketch as before.
- Select Sketch > Show Sketch Folder from the Arduino IDE menus.
The folder containing the sketch will open in your file manager. - ZIP the entire sketch folder.
- Instructions for Windows:
- Right click the sketch folder.
- From the context menu that opens, select "Send to".
- Select "Compressed (zipped) folder" from the "Send to" menu.
- Instructions for Linux:
- Right click the sketch folder.
- From the context menu that opens, select "Compress...".
- In the "Create Archive" dialog that opens, click the "Create" button.
- Instructions for macOS:
- Control-click the sketch folder.
- From the shortcut menu that opens, select "Compress"
- Instructions for Windows:
- Attach the "ZIP" file that was created to a reply here on this forum thread.
You can do this by drag and dropping the file onto a reply, copy/pasting the file, or by clicking the upward pointing arrow icon ("Upload") on the post composer toolbar.
C. Disable Language Server Logging
When language server logging is enabled, log files are saved to every sketch you open in Arduino IDE and they steadily grow in size whenever you are editing the sketch. So the logging is something you would usually want to disable whenever generation of logs is not needed.
- Use the Ctrl/⌘+Shift+P keyboard shortcut to open the "Command Palette" in Arduino IDE.
- Select the "Preferences: Open Settings (UI)" command from the "Command Palette".
The "Preferences" tab will now open in the editor panel. - In the "Search Settings" field, type
arduino.language.log
- Under the "Arduino > Language: Log", section, uncheck the box next to "
☑
True if the Arduino Language Server should generate log files into the sketch folder. Otherwise, false. It's false by default." - Close the Preferences tab by clicking its X icon.
You are now welcome to delete the .log
files that were added to the sketch folder.
Thanks, here it is.
Squeezer_9_12_23.zip (15.4 KB)
Hope it makes some sense to you. The logs look like Martian to me.
Rich
NOW, it working! I haven't changed a thing other than generate the log files, then delete them.
It is better to have something working and not know why than have it not working and not know why.
I will post again if it quits on me.
It comes and goes. No idea what I do to cause either.
This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.