Dear Arduino Team,
Could you please consider adding feature
'Go to error line when click on error in Output view' ?
Error is here:
Thank you
Frank
Thanks for bringing this to our attention @frank_11 . I am able to reproduce the bug and have submitted a formal report to the Arduino IDE developers on your behalf:
opened 06:20AM - 11 May 24 UTC
topic: code
type: imperfection
### Describe the problem
Arduino IDE has features to facilitate navigation inโฆ the editor to the code lines associated with a compilation error:
- Editor tab for file associated with error automatically selected and editor view scrolled to make associated line visible (https://github.com/arduino/arduino-ide/pull/1064).
- Path/line number reference in error messages displayed in "**Output**" panel are linked ("**Reveal Error**"): https://github.com/arduino/arduino-ide/pull/1275
- If multiple errors occurred and `arduino.compile.experimental` setting is enabled, "**Previous Error**" and "**Next Error**" links are shown above the code line when the cursor is placed at the line associated with an error (https://github.com/arduino/arduino-ide/pull/1064).
๐ These features work only intermittently for errors associated with sketch files other than the primary `.ino` file.
### To reproduce
1. Select **File > New Sketch** from the Arduino IDE menus.
1. Add the following line to the sketch code:
```cpp
#error
```
1. Select any board from the **Tools > Board** menu.
1. Select **Sketch > Verify/Compile** from the Arduino IDE menus.
1. Wait for the compilation to fail.
1. Note that the path:line number reference in the error message in the "**Output**" panel is underlined to indicate it is a link.
1. Hover the mouse pointer over the path:line number reference in the error message in the "**Output**" panel.
๐ A UI element appears with a "**Reveal Error**" link, as expected.
1. Remove the `#error` directive from the sketch code.
1. Click the **โโโ** at the right side of the main panel toolbar.
A menu will open.
1. Select "**New Tab**" from the menu.
The "**Name for new file**" dialog will open.
1. Type `Foo` in the field in the dialog.
1. Click the "**OK**" button.
The dialog will close and a "**Foo.ino**" tab will be added to the main panel.
1. Add the following line to the "**Foo.ino**" tab:
```cpp
#error
```
1. Select the leftmost tab in the main panel.
1. Select **Sketch > Verify/Compile** from the Arduino IDE menus.
1. Wait for the compilation to fail.
๐ The "**Foo.ino**" tab was not selected.
๐ The path:line number reference in the error message in the "**Output**" panel is not underlined.
1. Hover the mouse pointer over the path:line number reference in the error message in the "**Output**" panel.
๐ "**Reveal Error**" UI element does not appear.
### Expected behavior
Error line navigation features work reliably for all code files.
### Arduino IDE version
aa9b10d
### Operating system
- Windows
- Linux
- macOS
### Operating system version
- Windows 11
- Ubuntu 22.04
- macOS 14.4.1
### Additional context
I have found the instructions provided above to reliably produce the fault, but during other experiments I found that the features do work intermittently with additional sketch files (including those with non-`.ino` file extensions). So this is not a matter of a complete lack of support for additional files in these features.
---
Originally reported at https://forum.arduino.cc/t/go-with-cursor-to-file-line-when-click-on-error-in-outpput-view/1258215
### Issue checklist
- [X] I searched for previous reports in [the issue tracker](https://github.com/arduino/arduino-ide/issues?q=)
- [X] I verified the problem still occurs when using the latest [nightly build](https://www.arduino.cc/en/software#nightly-builds)
- [X] My report contains all necessary details
If you have a GitHub account, you can subscribe to that thread to get notifications of any new developments related to this subject:
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.
As I mention in the issue, the feature you are requesting has already been implemented and does already work sometimes even for errors produced by code in .hpp files. Unfortunately my experiments indicate that the feature only works reliably for errors produced by the code in the primary .ino file of the sketch and it is quite hit and miss for errors produced by code in any additional files.
1 Like
Aha, I see Ctrl + click brings you to an error in .ino code. Error report is underlined whereas the error reported from .cpp is not.
system
Closed
November 7, 2024, 7:21pm
4
This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.