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

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

Closed
3 tasks done
per1234 opened this issue Sep 22, 2023 · 1 comment · Fixed by #2242
Closed
3 tasks done
Assignees
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

@per1234
Copy link
Contributor

per1234 commented Sep 22, 2023

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
@per1234 per1234 added topic: code Related to content of the project itself type: imperfection Perceived defect in any part of project labels Sep 22, 2023
@fpistm

This comment was marked as duplicate.

@kittaakos kittaakos self-assigned this Sep 25, 2023
kittaakos pushed a commit that referenced this issue Sep 29, 2023
kittaakos added a commit that referenced this issue Oct 5, 2023
 - update status bar if board+port is restored,
 - refresh the debug toolbar if board+port is restored,
 - init `Include Library` if board+port is ready, and
 - init library examples if board+port is ready

Closes #2237
Closes #2239

Signed-off-by: Akos Kitta <[email protected]>
@kittaakos kittaakos added the conclusion: resolved Issue was resolved label Oct 5, 2023
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.

3 participants