Recent

Author Topic: Breakpoints don't adjust to source code changes.  (Read 3722 times)

vfclists

  • Hero Member
  • *****
  • Posts: 1013
    • HowTos Considered Harmful?
Breakpoints don't adjust to source code changes.
« on: August 23, 2014, 10:04:00 am »
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.
Lazarus 3.0/FPC 3.2.2

vfclists

  • Hero Member
  • *****
  • Posts: 1013
    • HowTos Considered Harmful?
Re: Breakpoints don't adjust to source code changes.
« Reply #1 on: September 15, 2014, 09:19:37 pm »
Bump??  :(


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.
Lazarus 3.0/FPC 3.2.2

Mike.Cornflake

  • Hero Member
  • *****
  • Posts: 1260
Re: Breakpoints don't adjust to source code changes.
« Reply #2 on: September 15, 2014, 09:39:24 pm »
Must admit, I haven't seen anything like that.
Lazarus Trunk/FPC Trunk on Windows [7, 10]
  Have you tried searching this forum or the wiki?:   http://wiki.lazarus.freepascal.org/Alternative_Main_Page
  BOOKS! (Free and otherwise): http://wiki.lazarus.freepascal.org/Pascal_and_Lazarus_Books_and_Magazines

Blaazen

  • Hero Member
  • *****
  • Posts: 3237
  • POKE 54296,15
    • Eye-Candy Controls
Re: Breakpoints don't adjust to source code changes.
« Reply #3 on: September 15, 2014, 09:40:16 pm »
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.
Lazarus 2.3.0 (rev main-2_3-2863...) FPC 3.3.1 x86_64-linux-qt Chakra, Qt 4.8.7/5.13.2, Plasma 5.17.3
Lazarus 1.8.2 r57369 FPC 3.0.4 i386-win32-win32/win64 Wine 3.21

Try Eye-Candy Controls: https://sourceforge.net/projects/eccontrols/files/

Laksen

  • Hero Member
  • *****
  • Posts: 724
    • J-Software
Re: Breakpoints don't adjust to source code changes.
« Reply #4 on: September 15, 2014, 10:49:24 pm »
You are using a very old fpc and lazarus according to your signature. Have you tried updating?

vfclists

  • Hero Member
  • *****
  • Posts: 1013
    • HowTos Considered Harmful?
Re: Breakpoints don't adjust to source code changes.
« Reply #5 on: September 15, 2014, 10:53:53 pm »
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.

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
Lazarus 3.0/FPC 3.2.2

Martin_fr

  • Administrator
  • Hero Member
  • *
  • Posts: 9794
  • Debugger - SynEdit - and more
    • wiki
Re: Breakpoints don't adjust to source code changes.
« Reply #6 on: September 16, 2014, 12:29:23 am »
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).


 

TinyPortal © 2005-2018