Bug 424431

Summary: Loaded breakpoints don't update properly if code is edited
Product: [Applications] kdevelop Reporter: Axel Kellermann <axel.kellermann>
Component: UI: generalAssignee: kdevelop-bugs-null
Status: RESOLVED FIXED    
Severity: normal CC: piotr.mierzwinski
Priority: NOR    
Version: 5.5.2   
Target Milestone: ---   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed In: 5.6.0

Description Axel Kellermann 2020-07-19 16:40:49 UTC
SUMMARY
Breakpoints that were loaded with the project don't get properly updated if source code is edited.

STEPS TO REPRODUCE
1. Open project
2. Set breakpoints
3. Close project
4. Open project again
5. Add or remove lines in the source code

OBSERVED RESULT
Breakpoint positions are not properly updated in BreakpointModel and therefore in Breakpoint Tool View.

EXPECTED RESULT
Proper updates of breakpoints.

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: Archlinux
KDE Plasma Version: 5.19.3
KDE Frameworks Version: 5.72.0
Qt Version: 5.15.0

ADDITIONAL INFORMATION
I have a fix for that issue locally, going to send it in for review the coming days.
Comment 2 Igor Kushnir 2020-08-16 19:46:11 UTC
Git commit ff7a0ea60d4d7546b09dafdfedfc0db18b59e722 by Igor Kushnir, on behalf of Axel Kellermann.
Committed on 16/08/2020 at 19:41.
Pushed by igorkushnir into branch '5.6'.

Associate loaded breakpoints with a moving cursor

Loaded breakpoints don't trigger markChanged(), which is normally
responsible for getting a moving cursor for breakpoints. Instead
the moving cursor for loaded breakpoints is now added in
textDocumentCreated().
Logic for adding moving cursors is also moved into seperate function,
as the same code snippet was used multiple times.
FIXED-IN: 5.6.0

M  +32   -23   kdevplatform/debugger/breakpoint/breakpointmodel.cpp
M  +3    -1    kdevplatform/debugger/breakpoint/breakpointmodel.h

https://invent.kde.org/kdevelop/kdevelop/commit/ff7a0ea60d4d7546b09dafdfedfc0db18b59e722
Comment 3 Piotr Mierzwinski 2020-08-16 21:32:39 UTC
I think this is duplication this bug #363237 "Breakpoints (Breakpoints View) are not updated after removing/adding couple lines of code"