Skip to content

Additional sketches can't be opened via file association/command line argument #1590

Closed
@per1234

Description

@per1234

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 to the IDE command line invocation.

🐛 This only works once per IDE session. After that, attempting to open additional sketches in this manner has no effect.

To reproduce

  1. Select File > Quit from the Arduino IDE menus if it is running.
  2. Open a sketch via file association or command line argument:
    & ".\Arduino IDE" "C:\Users\per\Documents\Arduino\Foo"
    
    🙂 The IDE starts up with the specified sketch open, as expected.
  3. Open a different sketch via file association or command line argument:
    & ".\Arduino IDE" "C:\Users\per\Documents\Arduino\Bar"
    

🐛 The command exits immediately with no effect. The specified sketch is not opened in an IDE window.

Expected behavior

Additional sketches can be opened via file association or command line argument when the IDE is already running.

Arduino IDE version

2.0.1

Operating system

  • Windows
  • Linux

Operating system version

  • Windows 10
  • Ubuntu 20.04

Additional context

I bisected the regression to 2b2463b / #1563


Originally reported at https://forum.arduino.cc/t/arduino-ide-2-0-1-is-now-available/1046764/7

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

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions