Recent

Author Topic: FpDebug feature request  (Read 571 times)

440bx

  • Hero Member
  • *****
  • Posts: 4905
FpDebug feature request
« on: October 02, 2024, 11:54:59 pm »
Hello,

Case 1:

When hovering over an array variable, if the array is part of a record that is being accessed in the scope of a "with" statement then FpDebug cannot currently show the value of the referenced array element.  Please see the first attachment.

Case 2:

if the array variable is explicitly qualified with the record name then FpDebug _can_ (and does) show the value of the referenced array element.  Please see the second attachment.

the feature request is: add the capability in FpDebug to resolve the scope in which the variable appears (it normally does anyway.) This would enable it to show the value in case 1 as it does in case 2.

Comments welcome.
(FPC v3.0.4 and Lazarus 1.8.2) or (FPC v3.2.2 and Lazarus v3.2) on Windows 7 SP1 64bit.

Martin_fr

  • Administrator
  • Hero Member
  • *
  • Posts: 10690
  • Debugger - SynEdit - and more
    • wiki
Re: FpDebug feature request
« Reply #1 on: October 03, 2024, 01:17:36 am »
There is no "with" info in the debug info. (dwarf has it, fpc does not use it / fpdebug hence doesn't have it yet either).

IIRC, some variables work in "with" blocks, because codetools gets a go at it first. (but I may be mistaken).

If I am not mistaken, then it needs to be dealt with in codetools. (i.e. not something I (usually) work on / but something that can be done...)

Martin_fr

  • Administrator
  • Hero Member
  • *
  • Posts: 10690
  • Debugger - SynEdit - and more
    • wiki
Re: FpDebug feature request
« Reply #2 on: October 03, 2024, 01:19:40 am »
Just tested, codetools resolves this in other cases...

So bug report against code tools...

440bx

  • Hero Member
  • *****
  • Posts: 4905
Re: FpDebug feature request
« Reply #3 on: October 03, 2024, 01:29:30 am »
There is no "with" info in the debug info. (dwarf has it, fpc does not use it / fpdebug hence doesn't have it yet either).
I see.  Without that information it's definitely complicated to say the least.

IIRC, some variables work in "with" blocks, because codetools gets a go at it first. (but I may be mistaken).
That would explain why there are cases in which it works.

If I am not mistaken, then it needs to be dealt with in codetools. (i.e. not something I (usually) work on / but something that can be done...)
It would be nice but, I think the real solution is to have FPC emit the necessary debug info. 

talking about info... thank you for all that information.
(FPC v3.0.4 and Lazarus 1.8.2) or (FPC v3.2.2 and Lazarus v3.2) on Windows 7 SP1 64bit.

 

TinyPortal © 2005-2018