Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Intermittent availability of error line navigation features for additional sketch files #2433

Open
3 tasks done
per1234 opened this issue May 11, 2024 · 0 comments
Open
3 tasks done
Labels
topic: code Related to content of the project itself type: imperfection Perceived defect in any part of project

Comments

@per1234
Copy link
Contributor

per1234 commented May 11, 2024

Describe the problem

Arduino IDE has features to facilitate navigation in the editor to the code lines associated with a compilation error:

🐛 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.
  2. Add the following line to the sketch code:
    #error
  3. Select any board from the Tools > Board menu.
  4. Select Sketch > Verify/Compile from the Arduino IDE menus.
  5. Wait for the compilation to fail.
  6. Note that the path:line number reference in the error message in the "Output" panel is underlined to indicate it is a link.
  7. 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.
  8. Remove the #error directive from the sketch code.
  9. Click the ●●● at the right side of the main panel toolbar.
    A menu will open.
  10. Select "New Tab" from the menu.
    The "Name for new file" dialog will open.
  11. Type Foo in the field in the dialog.
  12. Click the "OK" button.
    The dialog will close and a "Foo.ino" tab will be added to the main panel.
  13. Add the following line to the "Foo.ino" tab:
    #error
  14. Select the leftmost tab in the main panel.
  15. Select Sketch > Verify/Compile from the Arduino IDE menus.
  16. 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.
  17. 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

  • I searched for previous reports in the issue tracker
  • I verified the problem still occurs when using the latest nightly build
  • My report contains all necessary details
@per1234 per1234 added topic: code Related to content of the project itself type: imperfection Perceived defect in any part of project labels May 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
topic: code Related to content of the project itself type: imperfection Perceived defect in any part of project
Projects
None yet
Development

No branches or pull requests

1 participant