-
-
Notifications
You must be signed in to change notification settings - Fork 468
Closed
Labels
conclusion: resolvedIssue was resolvedIssue was resolvedcriticality: highOf high impactOf high impacttopic: debuggerRelated to the integrated debuggerRelated to the integrated debuggertype: imperfectionPerceived defect in any part of projectPerceived defect in any part of project
Description
Describe the bug
Breakpoints defined on local libraries are not considered.
To Reproduce
Very basic example with 3 files: Blink.ino
, LocalLibrary.h
, LocalLibrary.cpp
Two breakpoints defined: one in Blink.ino
, another in LocalLibrary.cpp
Expected behavior
Breakpoints defined on local library LocalLibrary.cpp
should be considered.
Actually, all the files are duplicated under a temporary folder, /private/var/folders/wn/n7qqb8ss0k3bvpqwfcdwp_7r0000gn/T/arduino-sketch-7CD787D3756B222A4A3572C34ED19F79/sketch/
The breakpoint on Blink.ino
is kept, but not the breakpoint on LocalLibrary.cpp
.
Workaround
Launch the debugging session.
Define the breakpoint on the local library again.
Screenshots
- Initial project folder during editing
- Initial project folder during debugging
- Copy to temporary folder during debugging
Desktop (please complete the following information):
- macOS 10.15
- Arduino Pro IDE 0.0.5
- SAMD core 1.8.5
Code
- Blink.ino
#include "LocalLibrary.h"
uint8_t myLED;
void setup()
{
Serial.begin(9600);
delay(500);
Serial.println(__FILE__);
myLED = LED_BUILTIN;
pinMode(myLED, OUTPUT);
}
void loop()
{
Serial.println(millis());
blinkLED(myLED, 3, 333);
delay(1000);
}
- LocalLibrary.h
#include "Arduino.h"
#ifndef blink_LocalLibrary_h
#define blink_LocalLibrary_h
///
/// @brief Blink a LED
/// @details LED attached to pin is turned on then off
/// @note Total cycle duration = ms
/// @param pin pin to which the LED is attached
/// @param times number of times
/// @param ms cycle duration in ms
/// @param level level for HIGH, default=true=positive logic, false=negative logic
///
void blinkLED(uint8_t pin, uint8_t times, uint16_t ms, bool level = true);
// !!! Help: https://bit.ly/2Bwmyk6
#endif // blink_LocalLibrary_h
- LocalLibrary.cpp
#include "LocalLibrary.h"
// Code
void blinkLED(uint8_t pin, uint8_t times, uint16_t ms, bool level)
{
for (uint8_t i = 0; i < times; i++)
{
digitalWrite(pin, level ? HIGH : LOW);
delay(ms >> 1);
digitalWrite(pin, level ? LOW : HIGH);
delay(ms >> 1);
}
}
Metadata
Metadata
Assignees
Labels
conclusion: resolvedIssue was resolvedIssue was resolvedcriticality: highOf high impactOf high impacttopic: debuggerRelated to the integrated debuggerRelated to the integrated debuggertype: imperfectionPerceived defect in any part of projectPerceived defect in any part of project