Skip to content

"Start Debugging" button incorrectly disabled if board was pre-selected on IDE startup #2237

Closed
@per1234

Description

@per1234

Describe the problem

The board+port selection is associated with sketches. That board and port are automatically selected in Arduino IDE when the sketch is later opened.

On startup, Arduino IDE automatically opens the sketches that were open at the time the previous IDE session was exited.

🐛 If the board selection is the one produced by the IDE opening an existing sketch with an associated board, the "Start Debugging" button will be incorrectly disabled.

To reproduce

  1. Select File > New from the Arduino IDE menus.
  2. Select File > Save As... from the Arduino IDE menus.
  3. Save the sketch to any convenient name and location.
    This step is performed in order to associate the board+network port selection with a sketch that can be restored on IDE startup.
  4. Select a board from the Arduino IDE menus.
  5. Select File > Quit from the Arduino IDE menus.
  6. Start Arduino IDE.
    The saved sketches that were open during the previous session will be restored.
  7. Select the window of the sketch that has the board pre-selected due to the association created in the previous steps.
  8. Hover the mouse pointer over the "Start Debugging" button on the IDE toolbar.

🐛 The button is disabled and a "Debug - No board selected" message appears on the toolbar.

Arduino IDE version

2.2.1

Operating system

Windows

Operating system version

11

Additional context

I bisected the regression to 69ae38e / #2165 (does not occur when using the build from the previous commit 9a6a457)

Workaround

  1. Select any other board from the Tools > Board menu in Arduino IDE.
  2. Select the target board in Arduino IDE once again.

After doing that, the "Start Debugging" button will work as expected.

Additional reports

Related

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