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

Debug view blank on first debugging session of a sketch #2354

Closed
3 tasks done
per1234 opened this issue Feb 7, 2024 · 0 comments · Fixed by #2359
Closed
3 tasks done

Debug view blank on first debugging session of a sketch #2354

per1234 opened this issue Feb 7, 2024 · 0 comments · Fixed by #2359
Assignees
Labels
conclusion: resolved Issue was resolved topic: code Related to content of the project itself topic: debugger Related to the integrated debugger type: imperfection Perceived defect in any part of project

Comments

@per1234
Copy link
Contributor

per1234 commented Feb 7, 2024

Describe the problem

Arduino IDE has an integrated sketch debugger. The debugger interface is presented in a view in the left side panel of the Arduino IDE window. When the user initiates a debug session by clicking the "Start Debugging" button on the Arduino IDE toolbar, the "DEBUG" opens and the user can use the interface to debug their sketch.

🐛 On the first attempt to use the debugger with a given sketch, the "DEBUG" view is empty. It is only populated on the next IDE session.

To reproduce

  1. Connect one of the boards with debugger support to your computer as appropriate.
  2. Select the board from the Tools > Board menu.
  3. Select File > New Sketch from the Arduino IDE menus.
  4. Select Sketch > Verify/Compile from the Arduino IDE menus.
  5. Wait for the compilation process to finish.
  6. Click the "Start Debugging" button on the Arduino IDE toolbar.

🐛 The left side panel opens, but the "DEBUG" view is blank:

image

Expected behavior

The "DEBUG" view is always populated with the UI after the user clicks the "Start Debugging" button.

Arduino IDE version

2.3.0

Operating system

  • Windows
  • Linux

Operating system version

  • Windows 11
  • Ubuntu 22.04

Additional context

I haven't done a full bisection, but I am not able to reproduce the fault with Arduino IDE 2.2.1.


I also sometimes encounter a partially populated view:

image

I haven't determined under which conditions that variant occurs vs. the fully blank view, but the workaround applies to both.

Workaround

  1. Select File > Quit from the Arduino IDE menus.
  2. Start Arduino IDE.
  3. Select the window of the sketch you were attempting to use the debugger with previously.
    The "DEBUG" panel will now be populated with the standard debugger UI.
  4. Click the "Start Debugging" button on the Arduino IDE toolbar.

The debugger will now be initialized and work as usual.

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 topic: debugger Related to the integrated debugger labels Feb 7, 2024
@kittaakos kittaakos self-assigned this Feb 8, 2024
kittaakos pushed a commit that referenced this issue Feb 8, 2024
Use customized `PanelLayout#removeWidget` and `PanelLayout#insertWidget`
functions. The customized functions ensure no side effect when
adding/removing the widget to/from the layout but it's already
present/absent.

Closes: #2354
Signed-off-by: Akos Kitta <a.kitta@arduino.cc>
kittaakos pushed a commit that referenced this issue Feb 8, 2024
Use customized `PanelLayout#removeWidget` and
`PanelLayout#insertWidget` logic for the layout
updates. The customized functions ensure no side
effect if adding/removing the widget to/from the
layout but it's already present/absent.

Unlike the default [`PanelLayout#removeWidget`](https://github.com/phosphorjs/phosphor/blob/9f5e11025b62d2c4a6fb59e2681ae1ed323dcde4/packages/widgets/src/panellayout.ts#L154-L156)
behavior, do not try to remove the widget if it's
not present (has a negative index). Otherwise,
required widgets might be removed based on the
default [`ArrayExt#removeAt`](https://github.com/phosphorjs/phosphor/blob/9f5e11025b62d2c4a6fb59e2681ae1ed323dcde4/packages/algorithm/src/array.ts#L1075-L1077)
behavior.

Closes: #2354
Signed-off-by: Akos Kitta <a.kitta@arduino.cc>
kittaakos pushed a commit that referenced this issue Feb 8, 2024
Use customized `PanelLayout#removeWidget` and
`PanelLayout#insertWidget` logic for the layout
updates. The customized functions ensure no side
effect if adding/removing the widget to/from the
layout but it's already present/absent.

Unlike the default [`PanelLayout#removeWidget`](https://github.com/phosphorjs/phosphor/blob/9f5e11025b62d2c4a6fb59e2681ae1ed323dcde4/packages/widgets/src/panellayout.ts#L154-L156)
behavior, do not try to remove the widget if it's
not present (has a negative index). Otherwise,
required widgets might be removed based on the
default [`ArrayExt#removeAt`](https://github.com/phosphorjs/phosphor/blob/9f5e11025b62d2c4a6fb59e2681ae1ed323dcde4/packages/algorithm/src/array.ts#L1075-L1077)
behavior.

Closes: #2354

Signed-off-by: Akos Kitta <a.kitta@arduino.cc>
kittaakos pushed a commit that referenced this issue Feb 8, 2024
Use customized `PanelLayout#removeWidget` and
`PanelLayout#insertWidget` logic for the layout
updates. The customized functions ensure no side
effect if adding/removing the widget to/from the
layout but it's already present/absent.

Unlike the default [`PanelLayout#removeWidget`](https://github.com/phosphorjs/phosphor/blob/9f5e11025b62d2c4a6fb59e2681ae1ed323dcde4/packages/widgets/src/panellayout.ts#L154-L156)
behavior, do not try to remove the widget if it's
not present (has a negative index). Otherwise,
required widgets might be removed based on the
default [`ArrayExt#removeAt`](https://github.com/phosphorjs/phosphor/blob/9f5e11025b62d2c4a6fb59e2681ae1ed323dcde4/packages/algorithm/src/array.ts#L1075-L1077)
behavior.

Closes: #2354

Signed-off-by: Akos Kitta <a.kitta@arduino.cc>
kittaakos pushed a commit that referenced this issue Feb 8, 2024
Use customized `PanelLayout#removeWidget` and
`PanelLayout#insertWidget` logic for the layout
updates. The customized functions ensure no side
effect if adding/removing the widget to/from the
layout but it's already present/absent.

Unlike the default [`PanelLayout#removeWidget`](https://github.com/phosphorjs/phosphor/blob/9f5e11025b62d2c4a6fb59e2681ae1ed323dcde4/packages/widgets/src/panellayout.ts#L154-L156)
behavior, do not try to remove the widget if it's
not present (has a negative index). Otherwise,
required widgets might be removed based on the
default [`ArrayExt#removeAt`](https://github.com/phosphorjs/phosphor/blob/9f5e11025b62d2c4a6fb59e2681ae1ed323dcde4/packages/algorithm/src/array.ts#L1075-L1077)
behavior.

Closes: #2354

Signed-off-by: Akos Kitta <a.kitta@arduino.cc>
@per1234 per1234 added the conclusion: resolved Issue was resolved label Feb 8, 2024
kittaakos pushed a commit that referenced this issue Feb 14, 2024
Use customized `PanelLayout#removeWidget` and
`PanelLayout#insertWidget` logic for the layout
updates. The customized functions ensure no side
effect if adding/removing the widget to/from the
layout but it's already present/absent.

Unlike the default [`PanelLayout#removeWidget`](https://github.com/phosphorjs/phosphor/blob/9f5e11025b62d2c4a6fb59e2681ae1ed323dcde4/packages/widgets/src/panellayout.ts#L154-L156)
behavior, do not try to remove the widget if it's
not present (has a negative index). Otherwise,
required widgets might be removed based on the
default [`ArrayExt#removeAt`](https://github.com/phosphorjs/phosphor/blob/9f5e11025b62d2c4a6fb59e2681ae1ed323dcde4/packages/algorithm/src/array.ts#L1075-L1077)
behavior.

Closes: #2354

Signed-off-by: Akos Kitta <a.kitta@arduino.cc>
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 topic: debugger Related to the integrated debugger type: imperfection Perceived defect in any part of project
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants