Recent

Author Topic: Mac tooltips in Lazarus  (Read 2543 times)

VTwin

  • Hero Member
  • *****
  • Posts: 1215
  • Former Turbo Pascal 3 user
Mac tooltips in Lazarus
« on: July 29, 2022, 03:03:27 am »
I normally develop on my Mac PowerBook (M1), however when debugging the tooltips displaying variables values rarely work. I therefore switch to my older Mac PowerBook which has Windows on VirtualBox to do debugging.

Is this bug possible to fix?

 
“Talk is cheap. Show me the code.” -Linus Torvalds

Free Pascal Compiler 3.2.2
macOS 12.1: Lazarus 2.2.6 (64 bit Cocoa M1)
Ubuntu 18.04.3: Lazarus 2.2.6 (64 bit on VBox)
Windows 7 Pro SP1: Lazarus 2.2.6 (64 bit on VBox)

skalogryz

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2770
    • havefunsoft.com
Re: Mac tooltips in Lazarus
« Reply #1 on: July 29, 2022, 03:06:09 am »
are usual tooltips shown normally (not related to debugging)

VTwin

  • Hero Member
  • *****
  • Posts: 1215
  • Former Turbo Pascal 3 user
Re: Mac tooltips in Lazarus
« Reply #2 on: July 31, 2022, 11:33:25 pm »
Thanks. Yes, tooltips on the Form View work fine. No problem in my compiled applications either.
“Talk is cheap. Show me the code.” -Linus Torvalds

Free Pascal Compiler 3.2.2
macOS 12.1: Lazarus 2.2.6 (64 bit Cocoa M1)
Ubuntu 18.04.3: Lazarus 2.2.6 (64 bit on VBox)
Windows 7 Pro SP1: Lazarus 2.2.6 (64 bit on VBox)

Martin_fr

  • Administrator
  • Hero Member
  • *
  • Posts: 9792
  • Debugger - SynEdit - and more
    • wiki
Re: Mac tooltips in Lazarus
« Reply #3 on: July 31, 2022, 11:53:42 pm »
Quote
Yes, tooltips on the Form View work fine.
Tooltips on the editor too? When not debugging, do you get a hint that says where the identifier is defined?
When debugging, do you still get the hint. I.e. the static date about the source code still happens, but there is no added info about the current value in the debugged app?
See also menu: Tools > Options :: Editor > Hints


Does it work, if you put the same term into the watches window?
I.e. if you hover "Form1" or "MyCounter" add them to watches, and check.

Are those properties? => They don't work if they have a getter function. (being worked on by Joost, but will be a while)

Are you using FPC 3.2.2 or something newer? There is a report that the debugger is broken with newer fpc versions on Mac.
https://gitlab.com/freepascal.org/lazarus/lazarus/-/issues/39696



VTwin

  • Hero Member
  • *****
  • Posts: 1215
  • Former Turbo Pascal 3 user
Re: Mac tooltips in Lazarus
« Reply #4 on: August 01, 2022, 04:17:08 pm »
Thanks.

The tooltips (such as where a variable is defined) work in the editor. However, they stop working when debugging. That is in addition to not to displaying info about the variable's value.

The values do show up in the Watches window. When I add a watch the tooltips start working in the current function for all variables, not just the one in the Watches window. If I step ahead the tooltips seem to keep working.

This is a helpful workaround. If I clear the watches and restart the debugging, the same occurs. 

No, not properties, regular variables.

I am using FPC 3.2.2   
“Talk is cheap. Show me the code.” -Linus Torvalds

Free Pascal Compiler 3.2.2
macOS 12.1: Lazarus 2.2.6 (64 bit Cocoa M1)
Ubuntu 18.04.3: Lazarus 2.2.6 (64 bit on VBox)
Windows 7 Pro SP1: Lazarus 2.2.6 (64 bit on VBox)

Martin_fr

  • Administrator
  • Hero Member
  • *
  • Posts: 9792
  • Debugger - SynEdit - and more
    • wiki
Re: Mac tooltips in Lazarus
« Reply #5 on: August 01, 2022, 06:06:18 pm »
Sounds like there are several things internally going wrong...

You could try to get a log
https://forum.lazarus.freepascal.org/index.php/topic,42869.0.html

and then report a bug with that log (I don't know when I will actually have the time to look at it).

That is, if the log actually catches any data / there have been indications that it may be broken too (for quite some time actually) => but I didn't have  time to check that either...


VTwin

  • Hero Member
  • *****
  • Posts: 1215
  • Former Turbo Pascal 3 user
Re: Mac tooltips in Lazarus
« Reply #6 on: August 01, 2022, 06:16:28 pm »
Thanks Martin! I will see what I can do to report the bug.

Somehow entering a watch triggers the tooltips to work. At least I should no longer have to copy my project to another machine for debugging. :)
“Talk is cheap. Show me the code.” -Linus Torvalds

Free Pascal Compiler 3.2.2
macOS 12.1: Lazarus 2.2.6 (64 bit Cocoa M1)
Ubuntu 18.04.3: Lazarus 2.2.6 (64 bit on VBox)
Windows 7 Pro SP1: Lazarus 2.2.6 (64 bit on VBox)

VTwin

  • Hero Member
  • *****
  • Posts: 1215
  • Former Turbo Pascal 3 user
Re: Mac tooltips in Lazarus
« Reply #7 on: August 01, 2022, 07:09:19 pm »
I am currently not able to reproduce the bug in other applications, but if this looks useful I can submit it.

“Talk is cheap. Show me the code.” -Linus Torvalds

Free Pascal Compiler 3.2.2
macOS 12.1: Lazarus 2.2.6 (64 bit Cocoa M1)
Ubuntu 18.04.3: Lazarus 2.2.6 (64 bit on VBox)
Windows 7 Pro SP1: Lazarus 2.2.6 (64 bit on VBox)

VTwin

  • Hero Member
  • *****
  • Posts: 1215
  • Former Turbo Pascal 3 user
Re: Mac tooltips in Lazarus
« Reply #8 on: August 01, 2022, 09:15:13 pm »
I realized I was still using "Dwarf with sets", but changing it to Dwarf2 or Dwarf3 does not change the behavior.
“Talk is cheap. Show me the code.” -Linus Torvalds

Free Pascal Compiler 3.2.2
macOS 12.1: Lazarus 2.2.6 (64 bit Cocoa M1)
Ubuntu 18.04.3: Lazarus 2.2.6 (64 bit on VBox)
Windows 7 Pro SP1: Lazarus 2.2.6 (64 bit on VBox)

Martin_fr

  • Administrator
  • Hero Member
  • *
  • Posts: 9792
  • Debugger - SynEdit - and more
    • wiki
Re: Mac tooltips in Lazarus
« Reply #9 on: August 02, 2022, 12:47:43 am »
Well the log contains data ... good. But it's only useful, if you can reproduce.

The dwarf version is unlikely to be at fault.

My first *guess* is that some state in the debugger is not updated. And the watches fix it.
This could be setting context such as thread and stackframe.
Or reading of registers / maybe the bug also comes and goes with
- the register window open/closed
- the stack and/or thread window open/closed

The issue may also be dependent on the type of variable: global or local/field...

-----------
About reproducing.

Note that if you have a watch added to the watch window, it will likely still "fix" the issue - even if the watch window is closed. => You need to remove all values from the window.

The best changes of reproducing the issue
- Open the view > debug window > "history" window, and use the power button to switch it off.
- close watches, locals, inspect, evaluate, stack, registers and thread window (or if they have, disable them with the power button)



 

TinyPortal © 2005-2018