Hover Information not working

I used to be able to hover the mouse over functions, variables, etc. and a popup would provide relevant information about the item I am hovering over. That has stopped working. I think it may have stopped when i upgraded to the latest version.

I search the forum and found a user in May with a similar issue. His solution was to move the files to the local hardrive. my files were on the Onedrive, I tried moving them to the C drive, even rebooted the PC, but still no joy!

I am using IDE 2.2.1 on Windows 64 bit Windows 10 Pro.

1 Like

@ptillisch I think this is your speciality.

If it was me, I would erase

C:\Users\<username>\.arduinoIDE\settings.json

but it is possibly not a good thing ™.

Hi @aughtago. Which board do you have selected from the Tools > Board menu in Arduino IDE?

There was a bug that caused the problem you describe under these conditions. However, that bug was fixed in Arduino IDE 2.2.0, so Arduino IDE 2.2.1 users wont' be affected by it.

So the problem you are experiencing must have some other cause even if the symptoms happen to be the same.

It should not cause any serious harm.

This file is where some of the Arduino IDE settings are stored. Deleting it will cause all settings to revert to the defaults. So if you had previously made some special configuration of the Arduino IDE settings then those would be lost. If the custom settings are important to the user then they would need to configure the IDE once again as it was before. But if the user had been tinkering around changing settings willy-nilly then they might like to have a reset back to the defaults

Arduino NANO

when you asked me that, I wondered if it was because i had been using Uno in the past. I switched it to Uno and it works, then I switched it back to NANO and it still works!

I suspected so. Usually a config file will be recreated if it's missing. Thanks :sunglasses:

I forgot two things: Welcome here, and thanks for giving plenty enough information to get started with your issue right away :ok_hand:

  • Happy it works for you.

yes, searching old threads, I saw a trend of people looking for help, but not suppling the IDE or the system they were using.

I'm not sure why toggling the board fixed it, but hey it works, so I'm happy. thank you both for your time.

Sorry to resurface this old thread but it's the closest one reflecting my issue, which is
hovering over a library function no longer shows syntax in popup window. I think that feature provides great assistance for newbies like me, especially when you need to understand what return codes correlate to.

Am using IDE v2 (2.3.2) on Mac OS 14.4.1. The only main difference when it worked before I was using a Giga WiFi R1 board but had switched to UNO WiFi Rev2 due to limitations with Mbed WiFi.h library (didn't support ping() ).

Here's the few things that I had tried thus far:

  • Tried toggling Hover option on and off thru "Preferences: Open Settings (UI)" (via shift-command-p shortcut) but it shows Hover is enabled.
  • Deleted the .arduinoIDE/settings.json file but that didn't help so I went back using the original settings file.
  • Tried reinstalling IDE, overwriting existing install.

None of those approaches help. Would appreciate any guidance you can offer!

Cheers.

Hi @endreola. Does it work after you compile the sketch? The "context-aware" features (e.g., autocomplete, "IntelliSense", suggestions, "Go to Definition") only work for objects from a library after one of these events occurs following the time of the addition of the #include directive for a library's header file in a sketch:

  • The sketch is opened in Arduino IDE
  • A different board is selected in the Arduino IDE menus
  • The sketch is compiled

The reason for the deferred awareness of objects from libraries compared to the awareness of other objects in the sketch (which is updated after every edit to the code) is that the awareness of library objects is dependent on a process known as "library discovery", where Arduino IDE scans all installed libraries for a header files matching the #include directives of the sketch program and picks which libraries to add to the compiler's "search path". That "library discovery" process is somewhat resource intensive. The overhead of that resource usage is insignificant when it is done as part of the occasional manually triggered compile operation, but more significant when it comes to the continuous processing that is done to support the "context-aware" features. The developers decided to change to this "deferred discovery" approach for the "context-aware" feature support in response to user complaints that the previous approach was too heavy for lower spec PCs.


If compiling the sketch doesn't solve the problem, please provide instructions I could follow to reproduce the problem, including:

  • A minimal sketch code I can copy into my IDE
  • Instructions for which object in the sketch to hover

Does the compilation have to be successful for the rebuild to be triggered ?

It is only necessary for the library discovery phase (which is identified in the output by the "Detecting libraries used..." message) of the compilation to complete.

For example, if you compile this code:

#include <Servo.h>
#include <Nonexistent.h>
Servo foo;
void setup() {}
void loop() {}

Even though the Servo library was discovered:

Alternatives for Servo.h: [Servo@1.2.0]
ResolveLibrary(Servo.h)
  -> candidates: [Servo@1.2.0]

the library discovery phase in general fails due to not discovering any library to resolve the #include directive for Nonexistent.h:

Alternatives for Nonexistent.h: []
ResolveLibrary(Nonexistent.h)
  -> candidates: []

and you will find that there is no valid language server functionality for the Servo reference.

But if you compile this sketch:

#error
#include <Servo.h>
Servo foo;
void setup() {}
void loop() {}

You will find that, even though the compilation failed, the language server now has a knowledge of the Servo library because the library discovery phase of the compilation completed successfully.

Thank you

Hello @ptillisch,

The sketch compiles fine but unfortunately no popups occur on any of the objects.

Code is provided and the issue appears to occur with all objects.

Note: The code as it sits today still requires additional "tweaking". The goal is to detect when ping() responses fail for a period of time then power cycle the IoT device. I'm still trying to wrap my arms around how WiFiNINA.h enumerates wl_status_t.

/*
  This example connects to a encrypted WiFi network (WPA/WPA2).
  Then it prints the MAC address of the WiFi 101 Shield,
  the IP address obtained, and other network details.
  Then it continuously pings given host specified by IP Address or name.

  Circuit:
   WiFi 101 Shield attached / MKR1000
   or embedded WiFi circuitry as found in UNO WiFi R2.

  created 13 July 2010
  by dlf (Metodo2 srl)
  modified 09 June 2016
  by Petar Georgiev
  modified 04 April 2024
  by Endreola
*/

#include <SPI.h>
#include <WiFiNINA.h>
// #include <avr/wdt.h>
#include "arduino_secrets.h"

///////please enter your sensitive data in the Secret tab/arduino_secrets.h
char ssid[] = SECRET_SSID;    // your network SSID (name)
char pass[] = SECRET_PASS;    // your network password (use for WPA, or use as key for WEP)
int status = WL_IDLE_STATUS;  // the WiFi radio's status
int i;                        // the number of incremental times that ping failed
int relay = 13;               // Tells Arduino the relay is connected to pin 13
int pingResult;

// Specify IP address or hostname
String hostName = "www.google.com";

void printCurrentNet() {
  // print the SSID of the network you're attached to:
  Serial.print("SSID: ");
  Serial.println(WiFi.SSID());

  // print the MAC address of the router you're attached to:
  byte bssid[6];
  WiFi.BSSID(bssid);
  Serial.print("BSSID: ");
  printMacAddress(bssid);

  // print the received signal strength:
  long rssi = WiFi.RSSI();
  Serial.print("signal strength (RSSI): ");
  Serial.println(rssi);

  // print the encryption type:
  byte encryption = WiFi.encryptionType();
  Serial.print("Encryption Type: ");
  Serial.println(encryption, HEX);
  Serial.println();
}

void connectWiFi() {
  int status = WL_IDLE_STATUS;
  
  while (status != WL_CONNECTED) {
    Serial.print("Attempting to connect to WPA SSID: ");
    Serial.println(ssid);
    // Connect to WPA/WPA2 network:
    status = WiFi.begin(ssid, pass);

    // wait 5 seconds before connecting:
    delay(5000);
  }
  
  // you're connected now, so print out the data:
  // Serial.println("");
  // Serial.println("You're connected to the network");
  printCurrentNet();
  printWiFiData();
  Serial.println();
}

void checkWiFi() {
  Serial.println(" - Checking WiFi connection");
  Serial.print("WiFi status = ");
  Serial.print(WiFi.status());
  Serial.println();
  // if ( (WiFi.status() != WL_CONNECTED) ) {
  if ( (WiFi.status() != 3) ) {
    Serial.println(F("\nWiFi lost. Calling connectWiFi()"));
    connectWiFi();
  }
}

void printMacAddress(byte mac[]) {
  for (int i = 5; i >= 0; i--) {
    if (mac[i] < 16) {
      Serial.print("0");
    }
    Serial.print(mac[i], HEX);
    if (i > 0) {
      Serial.print(":");
    }
  }
  Serial.println();
}

void powerOnIoT() {
  Serial.println("Powering ON IoT.");
  digitalWrite(relay, HIGH);   // Turn the relay on (HIGH is the voltage level = 1)
  
  // Serial.println("Waiting 30 seconds...");
  // delay(30000);
}

void powerCycleIoT() {
  Serial.println("Recycling power on IoT.");
  digitalWrite(relay, LOW);
  Serial.println("Pausing 1 minute before powering back on IoT, allow time for Orbi settle down.");
  delay(60000);

  setup();
}

void printWiFiData() {
  // print your WiFi 101 Shield's IP address:
  IPAddress ip = WiFi.localIP();
  Serial.print("IP address : ");
  Serial.println(ip);

  Serial.print("Subnet mask: ");
  Serial.println((IPAddress)WiFi.subnetMask());

  Serial.print("Gateway IP : ");
  Serial.println((IPAddress)WiFi.gatewayIP());

  // print your MAC address:
  byte mac[6];
  WiFi.macAddress(mac);
  Serial.print("MAC address: ");
  printMacAddress(mac);
}

void setup() {
  pinMode(relay, OUTPUT);      // Initialize the Atmel GPIO pin as an output
  
  // Initialize serial and wait for port to open:
  Serial.begin(9600);
  while (!Serial) {
    ; // wait for serial port to connect. Needed for native USB port only
  }

  // check for the presence of the shield:
  if (WiFi.status() == WL_NO_SHIELD) {
    Serial.println("WiFi 101 Shield not present");
    // don't continue:
    while (true);
  }
  powerOnIoT();
}

void loop() {
 checkWiFi();

  pingResult = WiFi.ping(hostName, 128);

  if (pingResult >= 0) {
    i = 0;
    Serial.print(" RTT = ");
    Serial.print(pingResult);
    Serial.println(" ms");
  /* 
  } else {
    while (i <= 30) {
      Serial.print("Attempts: ");
      Serial.print(i);
      // Serial.print(" - ping failed, error code: ");
      // Serial.println(pingResult);
      delay(30000); // wait 30 seconds
      i++;
      checkWiFi();
    }
    */
  }

  delay(30000);
}

Ah, I overlooked this information. This is the reason. Unfortunately the version of clangd C++ language server currently in use by Arduino IDE doesn't have support for the ATmega4809 microcontroller of the UNO WiFi Rev2:

Support for this microcontroller has been added in the recent versions of clangd, but unfortunately the Arduino developers haven't found the time to update the version of clangd used by Arduino IDE (which is not a trivial task) since that happened.

If you have a GitHub account, you can subscribe to that thread to get notifications of any new developments related to this subject:

screenshot of Subscribe button


:exclamation: Please only comment on the GitHub issue thread if you have new technical information that will assist with the resolution. General discussion and support requests are always welcome here on the Arduino Forum.


Ha! Just my luck. Looks like I'll have to resort to GitHub Arduino Libraries instead for syntax lookups.

Done

Thank you @ptillisch!