I have red wiggly lines under some of my code. Its very random and I am not sure why.
The sketch compiles fine and upload to the Arduino OK.
I have red wiggly lines under some of my code. Its very random and I am not sure why.
The sketch compiles fine and upload to the Arduino OK.
Which version of the Arduino IDE are you using?
Version 2.0.0-beta 5
Version: 2.0.0-beta.5
Date: 2021-04-15T10:44:02.569Z
CLI Version: 0.18.1 alpha [b3cf8e19]
As the version indicates, Arduino IDE 2.0.0-beta.5 is a beta stage version of the Arduino IDE. It is only intended to be used for beta testing. You should expect to encounter bugs when working with this version of the IDE. If you want a stable IDE, please use Arduino IDE 1.8.13.
I have found that, even when using mature professional IDEs, spurious results are common from the "problem matcher" feature that makes these squiggly red lines. It's the sort of thing you basically need to have intuition about when to pay attention to and when to ignore. That intuition is very challenging to develop. Once you have it, the flawed problem matcher results are useful. Before then, they do more harm than good by causing confusion and distraction.
I understand that the version is a beta version.... I thought you might want to know of the issue.
My thoughts are if you need this "intuition" maybe the red wiggly lines serve no real purpose.
Do you know of any courses which I can take to improve my red wiggly line intuition?
The red wiggly lines are things that the webkit think are mis-spelled. It's a bit odd having the spell checking active when most parts of Arduino aren't dictionary words.
Yes, feedback is very much appreciated.
The specific issue of Serial
has a couple of reports:
There are several others about the Arduino Language Server in general:
https://github.com/arduino/arduino-ide/issues?q=is%3Aissue+is%3Aopen+label%3A"topic%3A+language+server"
I have the same opinion.
I am actually not super knowledgeable in this area. For most of my time doing development work, I used more rudimentary text editing applications like Notepad++ and the classic Arduino IDE for all my development work. It's only recently that I started using more advanced IDEs like VS Code, PyCharm, Arduino Pro IDE, and Arduino IDE 2.x that have these sorts of features.
I can give you some keywords for research:
No, this is the language server reporting an error in the code. You should see the cause if you hover the mouse pointer over it or open the "Problems View" via the command palette (Ctrl+Shift+P).
Except if it flags things in a sketch that works as being wrong then it's a pile of crap.
My experience with several professional language servers indicates that this is a common occurrence. It is a bit of an acquired skill to determine which of the red squigglies are safe to disregard. Since beginners will not have such a skill, these are likely to be the cause of a lot of confusion.
I found that adding the standard
#include "Arduino.h"
got rid of the squigglies. Commenting out the line brought them back again. Code compiled fine with or without the #include.
This topic was automatically closed 120 days after the last reply. New replies are no longer allowed.