A couple of observations about viewing definitions in IDE 2.x (currently 2.3.2 in my case) using Windows 10
Quite frequently this simply does not work. I am aware from previous topics that it will not work with some processors, unless that has been fixed, but for me it often does not work even with the humble Nano classic
When it fails, hovering over the function name or variable does not pop up the definition nor do right click then Go to definition or Ctrl+F12 open at the definition or jump to it and Peek does nothing
The Nano and its COM port are selected in the IDE and "True if the Arduino Language Server should generate log files into the sketch folder" is set to false. I hope that it goes without saying that "Editor Quick Suggestions" is turned on in the IDE Preferences
I can find no rhyme nor reason to this behaviour, nor can I reproduce it on demand, but it is very frustrating. I have asked before whether it is possible to force the rebuild of the index to definitions but have never found the answer
Having said that, when it works I find it of limited use beyond discovering which file the definition is in. For instance, given a pop up such as this
is going to the definition and seeing this
really any more helpful ? The same goes for Peek
What would be much more helpful would be a link to the function body. I note that this is what happens when the function is in a .c file. For instance, Go to Definition for the delay() function opens wiring.c at this point
void delay(unsigned long ms)
{
uint32_t start = micros();
while (ms > 0) {
yield();
while ( ms > 0 && (micros() - start) >= 1000) {
ms--;
start += 1000;
}
}
}
IDE 2.x is very nearly helpful but seems inconsistent and I find it frustrating to use.
1 post - 1 participant