I’m seeing issues with the platformio debugger during single stepping and where breakpoints are set.
Problem 1: After stopping on a breakpoint, single stepping after the breakpoint
will not advance to the next line of code. Further single steps appear to just resume code execution.
Problem 2: Sometimes I place a breakpoint and the line it stops on is a few lines down from the breakpoint.
At first I thought that the code wasn’t compiled for debugging,
For problem 1 (Problem 2 to be saved for later, one thing at a time)
Set breakpoint on digitalRead(p2) in the source file main.cpp
Compile code using Run->Start Debugging. Wait for the program to stop on the temporary breakpoint in .platformio/packages./framework-arduino-mbed/cores/arduino/main.cpp
Press the continue button to execute the code to the set breakpoint at digitalRead(p2)
Attempt to step over the breakpoint. The execution will not advance to digitalRead(p3). If you press continue again, the program starts running instead of stepping to the next statement.
For problem #1 here is the simple program
#include <Arduino.h>
uint64_t ms_ticks;
void setup() {
// put your setup code here, to run once:
digitalRead(p2);
digitalRead(p3);
}
void loop() {
digitalRead(p4);
digitalRead(p5);
digitalRead(p6);
// put your main code here, to run repeatedly:
}
Here is the platformio.ini file to use with the above program.