-
-
Notifications
You must be signed in to change notification settings - Fork 431
Certain errors in libraries can stop the language server #1042
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
I am seeing this also on my sketch when trying to use the lvgl GUI lib and ESP32S3 etc. Dont know what is causing this, but it would be helpful if for example the error told you the file that was cuasing it so we casn actually investigate it "Error communicating with the language server: Error: write EOF: undefined." Can you now make the error "Error communicating with the language server: Error: write EOF: undefined in file %s" |
This comment was marked as resolved.
This comment was marked as resolved.
Hi @marcusobrien and @TzOk83. Thanks for your reports. 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
B. Gather Logs
C. Disable Language Server LoggingWhen 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.
You are now welcome to delete the |
Describe the problem
I discovered erroneous code which causes the language server to stop running.
To reproduce
Using Arduino IDE 2.0.0-rc7.
1: add https://www.pjrc.com/teensy/td_156/package_teensy_index.json to additional board manager URLs in File > Preferences
2: in boards manager, search for "teensy" and install Teensy package 1.56.1
3: set the current board to Tools > Board > Teensy > Teensy 4.1
4: copy this code into the IDE editor
5: hover your mouse over "printf" and this popup with info from the language server should appear.

6: quit the IDE, and edit ~/.arduino15/packages/teensy/hardware/avr/1.56.1/cores/teensy4/Print.h
7: on line 115, delete the semicolon at the end of the line and save the file with this intentional error


8: restart the IDE and again hover your mouse over "printf", same as in step 5 - but not the popup does not appear. Hovering over other keywords also gives no results, and other language server feature no longer work.

Expected behavior
Even though the Print.h code has an error, one would expect the language server to give some guidance about the error, at at least continue running. It shouldn't just stop and no longer function, just because code is missing a semicolon.
Arduino IDE version
2.0.0-rc7
Operating system
Linux
Operating system version
Ubuntu 20.04
Additional context
No response
Issue checklist
The text was updated successfully, but these errors were encountered: