arduino / arduino-ide

Arduino IDE 2.x
https://www.arduino.cc/en/software
GNU Affero General Public License v3.0
2.28k stars 387 forks source link

Intermittent problems with Editor Hover and Occurrences Highlight #2127

Open EarlVadim opened 1 year ago

EarlVadim commented 1 year ago

Describe the problem

tooltips for functions and variables work only for sketches located in the default folder %User/Documents/...%. But if in the Preferences the home folder is redefined to another one, then these hints no longer work.

To reproduce

Change Home folder in Preferences. Create New sketch (even empty) and check working popup hints on "loop" or "setup" functions.. Save sketch to Home folder. Check for broken popup tooltips.

Expected behavior

Broken tooltips.

Arduino IDE version

2.1.1

Operating system

Windows

Operating system version

Windows11

Additional context

No response

Issue checklist

per1234 commented 1 year ago

Hi @EarlVadim. This sounds like a known bug that has already been fixed:

Unfortunately we weren't able to include the fix in the Arduino IDE 2.1.1 release but it will definitely be in the next release.

For now, you can only get the fix by using a beta tester version of Arduino IDE. Please give that version a try and then reply here to let me know if the problem still occurs.

I'll provide instructions you can follow to install that version:

  1. Sign in to your GitHub account. (GitHub only allows downloads of the beta tester builds when you are signed in.)
  2. Open this page in your browser: https://github.com/arduino/arduino-ide/actions/runs/5243125693#artifacts
  3. Click the "Windows_X86-64_zip" link under the "Artifacts" section of the page.
  4. Wait for the download to finish.
  5. Unzip the downloaded file.
  6. Unzip the ZIP file you find inside the unzipped file to any convenient location on your computer. (yes, there are two layers of ZIP files 🙃)
  7. Run the Arduino IDE.exe file from the unzipped folder.

When you install the IDE via this ZIP file, it will not interfere with any other installations of Arduino IDE on your computer so you are welcome to have both beta tester versions as well as the release version of Arduino IDE installed on your computer at the same time.

EarlVadim commented 1 year ago

Hello @per1234 . Thank you for quick answer.. Yes, snapshot d79bc0d is worked. Thank you again.

UPD: It worked, but not stability. some values are loaded and some are not. In addition, there were problems with displaying all repetitions of variables or operators in the text of the sketch on the scroll bar. I hope I made it clear, or attach a screenshot?

per1234 commented 1 year ago

Hi @EarlVadim. Please provide detailed instructions I can follow to reproduce the faults you reported.

EarlVadim commented 1 year ago

Hi, @per1234

I can't write the instruction, I see these errors on my own projects. I'll just give two screenshots. In the first screenshot, popup hints work, but not all repeated selections are displayed. project for ESP32.

screen-001

on the second screenshot, all repetitions are displayed, but pop-up hints do not work. project for esp8266.

screen-002

both projects are open at the same time, but their behavior is different. hope you find the reason.

EarlVadim commented 1 year ago

Hello again.. In new version 2.2.1 also has big problems.

изображение

The cursor in the picture is on "voltageInput" but highlighted duplicate values are anywhere.

per1234 commented 11 months ago

Hi @EarlVadim. Please comment to let us know whether you are still experiencing this problem.

If you are, I'm going to ask you to provide some additional information that might allow us to identify the cause (we are not able to reproduce the fault on our own machines, which makes it difficult to investigate):

I'm going to ask you to provide the debug logs that are produced by the "Arduino Language Server" tool.

You can do that by following these instructions:

A. Enable Language Server Logging

  1. Use the Ctrl/⌘+Shift+P keyboard shortcut to open the "Command Palette" in Arduino IDE.
  2. Select the "Preferences: Open Settings (UI)" command from the "Command Palette". The "Preferences" tab will now open in the editor panel.
  3. Type arduino.language.log in the "Search Settings" field.
  4. Check the box under the "Arduino > Language: Log" setting.
  5. Close the Preferences tab by clicking its X icon.

B. Gather Logs

  1. Perform whatever procedure causes the problem you are experiencing in Arduino IDE.
  2. Select Sketch > Show Sketch Folder from the Arduino IDE menus. The folder containing the sketch will open in your file manager.
  3. Right click the sketch folder. A context menu will open.
  4. Select "Send to" from the context menu. A Send to" sub-menu will open.
  5. Select "Compressed (zipped) folder" from the "Send to" menu.
  6. Attach the "ZIP" file that was created to a comment here on this GitHub issue. âš  Don't use an email reply to make the comment. You must make the comment via the web interface here on the GitHub website in order for the attachment to be made: https://github.com/arduino/arduino-ide/issues/2127 You can do this by drag and dropping the file onto the comment field, or by clicking the paper clip icon on the comment 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.

  1. Use the Ctrl/⌘+Shift+P keyboard shortcut to open the "Command Palette" in Arduino IDE.
  2. Select the "Preferences: Open Settings (UI)" command from the "Command Palette". The "Preferences" tab will now open in the editor panel.
  3. Type arduino.language.log in the "Search Settings" field.
  4. Uncheck the box under the "Arduino > Language: Log" setting.
  5. 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.

EarlVadim commented 11 months ago

ARDUINO_MPPT_FIRMWARE_V1_3.zip

I wrote down for you the log of the same error that is in the previous screenshot. on page 4_Charging_Algorithm