Describe the problem
I try to debug my project, but when I set a breakpoint the target halts at a different line
Breakpoint is set to line 236, but as the orange highlight shows, the target hats at line 240
Optimize for debug is ticked
Core logs and symbols are enabled and there is no optimization
Initially it was optimized for debug (-Og), behaviour is the same
xModemMode is declared volatile (did this after stumbling on the shifted breakpoint, but it did change nothing)
When I try stepping through the code, I can reach the line 236 (although nothing works as intended because stepping disturbs the RS232 timings, data is lost, ...)
To reproduce
difficult to give an easy example as it seems to be highly dependent on the exact code
I can provide my source files confidentially if that helps
Expected behavior
debugger should stop at line 236
Arduino IDE version
Version: 2.3.9-nightly-20260330 Date: 2026-03-30T04:12:05.284Z CLI Version: 1.4.1 Copyright © 2026 Arduino SA
Operating system
Windows
Operating system version
win11 26200.7840
Additional context
No response
Issue checklist
Describe the problem
I try to debug my project, but when I set a breakpoint the target halts at a different line
Breakpoint is set to line 236, but as the orange highlight shows, the target hats at line 240
Optimize for debug is ticked
Core logs and symbols are enabled and there is no optimization
Initially it was optimized for debug (-Og), behaviour is the same
xModemMode is declared volatile (did this after stumbling on the shifted breakpoint, but it did change nothing)
When I try stepping through the code, I can reach the line 236 (although nothing works as intended because stepping disturbs the RS232 timings, data is lost, ...)
To reproduce
difficult to give an easy example as it seems to be highly dependent on the exact code
I can provide my source files confidentially if that helps
Expected behavior
debugger should stop at line 236
Arduino IDE version
Version: 2.3.9-nightly-20260330 Date: 2026-03-30T04:12:05.284Z CLI Version: 1.4.1 Copyright © 2026 Arduino SA
Operating system
Windows
Operating system version
win11 26200.7840
Additional context
No response
Issue checklist