Breakpoints don't adjust to source code changes. lazarus / 12-Debugger ---------------------------------------------------------------------- vfclists · 2014-08-23 08:04 I have noticed for some time that breakpoints get out of alignment when the source code changes. It is as if when you insert or delete lines, although the breakpoint positions appear to move with the changes you make, when you run the code they are totally out of line. I find that I need to do a clean and build before the start working properly. Is there a bug in this aspect of the IDE or am I doing something wrong? It is as though the compiler is not updating the settings required by the debugger. ---------------------------------------------------------------------- vfclists · 2014-09-15 19:19 Bump??  Quote from: vfclists on August 23, 2014, 10:04:00 amI have noticed for some time that breakpoints get out of alignment when the source code changes. It is as if when you insert or delete lines, although the breakpoint positions appear to move with the changes you make, when you run the code they are totally out of line. I find that I need to do a clean and build before the start working properly. Is there a bug in this aspect of the IDE or am I doing something wrong? It is as though the compiler is not updating the settings required by the debugger. ---------------------------------------------------------------------- Mike.Cornflake · 2014-09-15 19:39 Must admit, I haven't seen anything like that. ---------------------------------------------------------------------- Blaazen · 2014-09-15 19:40 This may be related to this bug: http://bugs.freepascal.org/view.php?id=26659 Simply, sometimes changes did not appear in executed project. This bug was in trunk from June to August '14 (2 - 3 months). Also, I don't know in what of your listed versions you noticed the problem. ---------------------------------------------------------------------- Laksen · 2014-09-15 20:49 You are using a very old fpc and lazarus according to your signature. Have you tried updating? ---------------------------------------------------------------------- vfclists · 2014-09-15 20:53 Quote from: Blaazen on September 15, 2014, 09:40:16 pmThis may be related to this bug: http://bugs.freepascal.org/view.php?id=26659 Simply, sometimes changes did not appear in executed project. This bug was in trunk from June to August '14 (2 - 3 months). Also, I don't know in what of your listed versions you noticed the problem. This problem seems to have existed far earlier. It is present in the Lazarus 1.0.8 which I still develop some older programs with. Anyway I do most of my current development using a recent trunk version, but the current one is earlier than 46097. I will check if it is fixed when I update Lazarus. @Laksen my signature is out of date, but I still use 1.0.8 for some old stuff. Thanks ---------------------------------------------------------------------- Martin_fr · 2014-09-15 22:29 If it happens, I assume, you can stop execution (and if no changes are made, run the app again, and they will still be all off? If so, and if it happens again, stop, then "reset debugger" (from run menu). And run app. Still wrong, or fixed? ------------------- Also keep an eye, on editing while you are RUNNING. (and if this affects your issue) In that case the debugger keeps a mapping, between the new line after your edit, and the line the code was on, when last compiled. This map should (should!) be cleared on every run (assuming that all changed code was recompiled, and that the exe, and the editor will be in sync. Editing while compiling, does not do that (and editing before the blue dots are loaded will also not). Sot in this 2 cases it will go wrong, but for one run only (as you edited, the next run will have a compile).