Skip to content

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

Closed
@Gartosz

Description

@Gartosz

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

Activity

Gartosz

Gartosz commented on Apr 2, 2025

@Gartosz
Author
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[/+] on Apr 3, 2025
nickthesafe

nickthesafe commented on Apr 3, 2025

@nickthesafe
marked opens wrong .ino file #2683 as a duplicate of this issue on Apr 3, 2025
kwagnitz

kwagnitz commented on Apr 5, 2025

@kwagnitz

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

Gartosz commented on Apr 5, 2025

@Gartosz
Author

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?

16 remaining items

Loading
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      Participants

      @kwagnitz@per1234@Gartosz@Harveyn4444@nickthesafe

      Issue actions

        Currently opened sketch loaded when another sketch is opened by command line argument while IDE already running · Issue #2678 · arduino/arduino-ide