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

Currently opened sketch loaded when another sketch is opened by command line argument while IDE already running #2678

Closed
3 tasks done
Gartosz opened this issue Apr 2, 2025 · 7 comments · Fixed by #2686
Closed
3 tasks done
Labels
conclusion: resolved Issue was resolved topic: code Related to content of the project itself type: imperfection Perceived defect in any part of project

Comments

@Gartosz
Copy link

Gartosz commented Apr 2, 2025

Describe the problem

In addition to opening them via the Arduino IDE GUI, sketches can be opened directly either via file association or by passing their path as an argument to the IDE command line invocation.

If a sketch is opened in this manner while Arduino IDE is already running, the currently opened sketch is opened again in a new window instead of the sketch specified by the command line argument.

To reproduce

  1. Open one sketch.
  2. Open different sketch by double clicking on an ino file.
  3. Both windows show the first one.

Expected behavior

I should have multiple sketches in multiple windows without need to use open option in the program.

Arduino IDE version

2.3.5

Operating system

Windows

Operating system version

11

Additional context

I bisected the regression to 859d29d / #2654 (does not occur when using the build at the previous commit d298b3f).


Opening additional sketches via the File > New Sketch menu item in the Arduino IDE GUI works correctly.

Additional reports

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
@Gartosz Gartosz added the type: imperfection Perceived defect in any part of project label Apr 2, 2025
@Gartosz

This comment has been minimized.

@per1234 per1234 changed the title Cannot open multiple sketches at once Currently opened sketch loaded when another sketch is opened by command line argument while IDE already running Apr 3, 2025
@per1234 per1234 added the topic: code Related to content of the project itself label Apr 3, 2025
@nickthesafe

This comment has been minimized.

@kwagnitz
Copy link

kwagnitz commented Apr 5, 2025

Ditto on Ubuntu Linux 24.04.
This has been a problem for a very long time. Makes the IDE confusing to use.
I don't know why it is so hard to correct.

@Gartosz
Copy link
Author

Gartosz commented Apr 5, 2025

Ditto on Ubuntu Linux 24.04. This has been a problem for a very long time. Makes the IDE confusing to use. I don't know why it is so hard to correct.

Then why haven't you reported that when the issue firstly occured?

@kwagnitz
Copy link

kwagnitz commented Apr 6, 2025

Just downloaded arduino-ide_nightly-20250406_Linux_64bit.AppImage.
Problem still exists there. If one instance of the IDE has a file open, clicking on a second file, brings up a second instance showing the first file, not the second one clicked on.
(Ubuntu 24.04)

@per1234
Copy link
Contributor

per1234 commented Apr 6, 2025

Hi @kwagnitz. Thanks for your report. I'm going to ask you to provide some additional information. Please follow these instructions:

  1. Start Arduino IDE.
  2. Click on a file from a different sketch than the one already open in the first Arduino IDE window, just as you did before.
  3. Wait for the new Arduino IDE window to open.
  4. Verify that the sketch from the other Arduino IDE window opened in the new window, rather than the sketch you clicked on.
  5. Select Help > About Arduino IDE from the Arduino IDE menus.
    The "Arduino IDE" dialog will open.
  6. Click the "Copy" button in the "Arduino IDE" dialog.
    This will copy the information from the dialog to your system clipboard.
  7. Create a comment here on this GitHub issue thread.
  8. Click on the comment field.
  9. Press the Ctrl+V keyboard shortcut to paste the content you copied in step 6 into the GitHub comment.
  10. Click the "Comment" button to publish your comment.

@kwagnitz
Copy link

kwagnitz commented Apr 6, 2025

I must apologise, @per1234.

I was accidentally using an older appimage.
Using
Version: 2.3.6-nightly-20250406
Date: 2025-04-06T03:21:50.829Z
CLI Version: 1.2.0

I can confirm that the correct file gets opened.
Tried it with 3 files simultaneously. 3 instances of the IDE opened, each with the different .ino that I'd clicked on.
Very glad it is fixed. It sure confused me each time I forgot that the behaviour was to show the same file in each instance.

Moral of the story: only have one version of appimage executable at a time.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
conclusion: resolved Issue was resolved topic: code Related to content of the project itself type: imperfection Perceived defect in any part of project
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants