Skip to content

Stopping debugger fails with an error #527

Closed
@AlbyIanna

Description

@AlbyIanna

Clicking the Stop button in the debugger does not stop the debugger and an error is produced.

Steps to reproduce

  1. Select your Arduino board in the board selection dropdown. Make sure the correct port is selected.
  2. Create a new Sketch with this content:
#define LED_PIN LED_BUILTIN
#define TIME_ON 500
#define TIME_OFF 500
// the setup function runs once when you press reset or power the board
void setup() {
	// initialize digital pin 13 as an output.
	Serial.begin(9600);
	pinMode(LED_PIN, OUTPUT);
	digitalWrite(LED_PIN, LOW);
	delay(3000);
}

// the loop function runs over and over again forever
void loop() {
	unsigned long msNow = millis();
	digitalWrite(LED_PIN, HIGH);   // turn the LED on (HIGH is the voltage level)
	delay(TIME_ON);              // wait for a second
	digitalWrite(LED_PIN, LOW);    // turn the LED off by making the voltage LOW
	delay(TIME_OFF);              // wait for a second
	unsigned long exitTime = millis();
	Serial.println(exitTime);
}
  1. Enable Optimize for Debugging in the Sketch menu
  2. Upload the Sketch (even if the sketch is already uploaded do this again to ensure you have debug symbols in the .elf file
  3. Click the “Start Debugging” button on the toolbar at the top:
    image
  4. The debug server will take a moment to start. Then, these buttons will appear
    image
  5. Press the Stop button to exit execution.
  6. The Stop button is still enabled. The debugger icon on the sidebar still has a “1” indicator. There is an error in the Output pane:
    kill failed for -3028Error: kill ESRCH
    (the -3028 part will likely vary)

Expected behavior

Clicking the Stop button in the debugger stops the debug session.

Additional information

The Stop button works fine when using 2.0.0-beta.11.

It occurs both when following the instructions for “Arduino Zero”, “CMSIS-DAP compliant debug probe”, or link.

This problem is likely caused by this issue on eclipse-theia -> eclipse-theia/theia#10164
and I believe it was introduced with this commit: eclipse-theia/theia@5d52762

Environment

Version: 2.0.0-beta.11-snapshot.82b1853
Date: 2021-09-02T12:57:26.115Z
CLI Version: 0.18.3 alpha [d710b642]
OS: Windows 10

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions