arduino-ide
arduino-ide copied to clipboard
Pulled remote sketches don't show error underlines and markers
Describe the bug When working on a sketch pulled from the cloud the user doesn't get any error marker/underline in the code editor. It makes a lot difficult to debug and troubleshoot the remote sketch.
To Reproduce Steps to reproduce the behavior:
- Go to web editor at https://create.arduino.cc/editor and Login
- Open blink example clicking the voice from left sidebar 'example' > '01. BASICS (6)' > 'blink.ino'
- Try to modify the sketch and when prompted by the dialog box save it as 'blink_test'
- Delete the last semicolon at line 36
- Open the IDE 2 software
- Go to sketchbook explorer clicking the first voice on left sidebar
- Open remote sketchbooks clicking on 🌐 tab in the sidebar
- Pull 'blink_test' clicking on down arrow icon on the right of the sketch's name
- Open the pulled sketch double clicking on 'blink_test' on the sidebar
- Try to verify -> it will give an error but no red underline at the end of line 36
- Save the sketch locally pressing CMD/Ctrl + Shift + S, save it in Arduino folder.
- Check line 36 and you will see the error underline where the semicolon is missing.
Expected behavior I expect to see the same behaviour of local sketches: if an error is present in the code I expect it to be red underlined and a red marker to be present in the scrollbar area in the far right.
Screenshots
Desktop (please complete the following information):
- OS: All
- Version: 2.0.0 beta 12
Additional context It seems not caused by a language server crash
An update: as of https://github.com/arduino/arduino-ide/pull/1107, the "problems" (AKA "diagnostics") feature this issue applies to is disabled by default. This means that the underlines would not be shown even if the feature was working correctly for remote sketches.
In order to reproduce the issue you must first enable the feature:
- Open the "Command Palette" (Ctrl/⌘+Shift+P).
- Select the "Preferences: Open Settings (UI)" command from the "Command Palette". The "Preferences" tab will now open in the editor panel.
- In the "Search Settings" field, type
arduino.language.realTimeDiagnostics
- Check the checkbox under the "Arduino › Language: Real Time Diagnostics" section if it is unchecked.
I expected that the bug would affect all language server features ("Go to definition", hover, suggest, parameter hints). But those seem to be working fine for remote sketches, so it seems the bug is specific to the "problems" feature.