CPU utilization Very High

Yes. The IDE does generate logs.

Windows

C:\Users\<user name>\AppData\Roaming\Arduino IDE\

(i.e., %APPDATA%\Arduino IDE\)

Linux

Folder named undefined created under the path you started the IDE from (so most often in the undefined subfolder of the IDE installation folder, but not necessarily so)

(this odd and inconvenient location is caused by a bug, for which a fix is in progress)

macOS

~/Library/Logs/Arduino IDE/

The ideal is to determine the most minimal set of conditions required to reliably reproduce the issue.

For this purpose, a "bisection" approach is useful. The idea is to find a "bad" state (where the bug does occur) and a "good" state (where the bug does not occur), and then methodically reduce the differences between the two states until you find the closest sets of conditions that will produce a good and a bad state. Once you get there, the cause of the bug often becomes clear, or at least much easier to find and fix.

You already have an initial "bad" state, which is the complete environment which happens to exist on your computer.

The next step is to find an initial "good" state. For this, it is useful to eliminate as many factors as possible. You can provide the IDE with pretty much a completely clean environment as far as Arduino-specific things go by doing this:

Quit the Arduino IDE and then rename all of the following folders:


:warning: Make sure to preserve and keep track of the previous folders, since these might contain things that are essential to later reproduce the "bad" state.

Windows

  • %LOCALAPPDATA%\Arduino15
    (e.g., C:\Users\<username>\AppData\Local\Arduino15)
  • %HOMEPATH%\.arduinoIDE
    (e.g., C:\Users\<username>\.arduinoIDE)
  • %APPDATA%\arduino-ide
    (e.g., C:\Users\<user name>\AppData\Roaming\arduino-ide)
  • %APPDATA%\Arduino IDE\
    (e.g., C:\Users\<user name>\AppData\Roaming\Arduino IDE\)
  • %USERPROFILE%\Documents\Arduino
    (e.g., C:\Users\<user name>\Documents\Arduino)

Linux

  • ~/.arduino15
  • ~/.arduinoIDE
  • ~/.config/arduino-ide
  • Folder named undefined created under the path you start the IDE from.
  • ~/Arduino

macOS

  • ~/Library/Arduino15
  • ~/.arduinoIDE
  • ~/Library/Application Support/arduino-ide
  • ~/Library/Logs/Arduino IDE/
  • ~/Arduino

Now you need to test to see whether the problem still occurs.

If the problem does still occur after cleaning the Arduino environment, then this is your new "bad" state. You have now reduced a significant number of the potential factors. We know that the problem is not dependent on any special configuration, boards platforms, libraries, or sketches. Unfortunately, the path forward to finding the "good" state from here is not so clear because now we have all the rest of the environment on your system to consider. You might be able to use your intuition to identify candidate factors to eliminate (e.g., shut down other applications, disconnect devices from your computer, TEMPORARILY disable your antivirus)

If the problem does still occur after cleaning the Arduino environment, then this is your initial "good" state.

Once you have a "good" state, the bisection can begin. The most efficient bisection procedure is achieved by cutting the difference between the "good" and "bad" states in half each time. So you might try replacing two of the five directories you renamed. Now test again. Depending on the results, you now have either a new "good" state or a new "bad" state.

Continue repeating this process until you reach the atomic scale. For example if you found that the transition between "good" and "bad" is whether or not the old sketchbook folder is in place, you are not done. You must then start bisecting your way through the sketches and libraries within the sketchbook until you find the specific one(s) that produce the "bad" state.

Language server logging is disabled by default. You can enable them by following these instructions:

  1. Use the Ctrl/+Shift+P keyboard shortcut to open the "Command Palette" in the 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. In the "Search Settings" field, type arduino.language.log
  4. Under the "Arduino > Language: Log", section, check the box next to "☐ True if the Arduino Language Server should generate log files into the sketch folder. Otherwise, false. It's false by default."
  5. Close the Preferences tab by clicking its X icon.

Log files will now be generated in the folder of each sketch you open in the Arduino IDE. You can quickly access the sketch folder by selecting Sketch > Show Sketch Folder from the Arduino IDE menus.