Skip to content

Communicate to the user cause of debugger not starting with uncompiled sketch #808

Closed
@per1234

Description

@per1234

Describe the current behavior

The Arduino IDE integrated debugger requires the sketch binary produced by compilation of the sketch. The path to this file is provided to the debugger via the launch.json file that is automatically generated by the IDE when the user clicks the "Start Debugging" button on the button bar.

For this reason, the debugger can not be initialized if the user didn't know or remember to compile the sketch before clicking the button.

🙁 The IDE does not communicate this problem to the user other than that clicking the "Start Debugging" button has no effect.

To reproduce

  1. Select File > New from the Arduino IDE menus.
  2. Select Tools > Board > Arduino SAMD (32-bits ARM Cortex-M0+) Boards > Arduino Zero (Programming Port from the Arduino IDE menus.
    There is no need to have a Zero connected to your computer for this demo.
  3. Click the "Start Debugging" button on the button bar.
  4. Wait as long as you need to feel certain that nothing is going to happen.

🙁 There is no feedback from the IDE that the debugger couldn't start, and no indication of what is wrong.

Describe the request

Display a notification when the IDE fails to initialize the debugger. Explain that they must compile or upload the sketch first.

Desktop

  • OS: Windows 10, Ubuntu 20.04
  • Version: 2.0.0-rc3-snapshot.759b410
    Date: 2022-01-31T13:15:29.574Z
    CLI Version: 0.20.2 [13783819]

Additional context

The "vscode-arduino-tools" extension that generates the debugger configuration knows of this issue and even attempts to generate an error message:

https://github.com/arduino/vscode-arduino-tools/blob/5382501e0b35f500bc8dcc9ffe877cdf37935552/src/extension.ts#L118

However, this error message is never shown to the user by the IDE.


The poor user experience of no feedback in this situation is exacerbated by the fact that there is also no immediate feedback after clicking the "Start Debugging" button when all is well, and it takes quite some time for the debugger to finally start up. In addition, you are punished if you get impatient and click the button multiple times. So the IDE trains you to expect some indeterminate wait for the debugger, and this causes you to wait quite some time before finally concluding something must be wrong (still with no indication of what went wrong).

It may also cause people to attempt to access the debugger via the activity bar icon (#14)

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions