Recent

Author Topic: FpDebug popup problem  (Read 4076 times)

440bx

  • Hero Member
  • *****
  • Posts: 6093
FpDebug popup problem
« on: April 27, 2024, 02:01:34 am »
Hello,

In the attached screenshot, the top part shows how the "DistancesAddress" is displayed correctly.

The bottom part shows it displayed incorrectly.  When there isn't enough space left at the bottom of the screen, some of the data seems to be scrolled off, e.g, the variable name is missing as are the first 3 of the array values (10, 10, 10)

HTH.
FPC v3.2.2 and Lazarus v4.0rc3 on Windows 7 SP1 64bit.

Martin_fr

  • Administrator
  • Hero Member
  • *
  • Posts: 12131
  • Debugger - SynEdit - and more
    • wiki
Re: FpDebug popup problem
« Reply #1 on: April 27, 2024, 09:21:52 am »
Strange, I tried to reproduce. Win10. 64bit

I get a hint with a scrollbar (and it is not scrolled).

It is possible to enter the hint with the mouse and scroll it (or select/copy text from it).


440bx

  • Hero Member
  • *****
  • Posts: 6093
Re: FpDebug popup problem
« Reply #2 on: April 27, 2024, 10:10:33 am »
Strange, I tried to reproduce. Win10. 64bit

I get a hint with a scrollbar (and it is not scrolled).

It is possible to enter the hint with the mouse and scroll it (or select/copy text from it).
On Win 7 64 bit SP1, there is no scrollbar, it is not possible to enter the hint, it is not possible to select any of its text and definitely not scrolling it.

FPC v3.2.2 and Lazarus v4.0rc3 on Windows 7 SP1 64bit.

WooBean

  • Sr. Member
  • ****
  • Posts: 303
Re: FpDebug popup problem
« Reply #3 on: April 27, 2024, 11:31:50 am »
Strange, I tried to reproduce. Win10. 64bit

I get a hint with a scrollbar (and it is not scrolled).

It is possible to enter the hint with the mouse and scroll it (or select/copy text from it).
On Win 7 64 bit SP1, there is no scrollbar, it is not possible to enter the hint, it is not possible to select any of its text and definitely not scrolling it.

From the same environment as 440bx and Lazarus 3.99 (current trunk) I can see exactly what was described.
I am used to such situation quite long time, but without pleasure. Long hints are not properly displayed, the "solution" is to scroll editor window to get a watched identifier at the top of editor window.
 
Platforms: Win7/64, Linux Mint 22.1 Xia

Martin_fr

  • Administrator
  • Hero Member
  • *
  • Posts: 12131
  • Debugger - SynEdit - and more
    • wiki
Re: FpDebug popup problem
« Reply #4 on: April 27, 2024, 01:12:31 pm »
I don't know if AnchorDocking makes a diff... (I don't have that).  440bx image looks like he also does not have it => but better if he can confirm.

In any way, this is the hint, not the debugger.

What happens if (outside debugging) you hover over "TForm" which has a longer FpDoc entry. Then there would also be a hint of several lines.

Martin_fr

  • Administrator
  • Hero Member
  • *
  • Posts: 12131
  • Debugger - SynEdit - and more
    • wiki
Re: FpDebug popup problem
« Reply #5 on: April 27, 2024, 01:59:28 pm »
Just tried, Windows 7 (though in a VM), 64bit todays 3.99.

Code: Pascal  [Select][+][-]
  1. //lots of empty lines
  2.  
  3. program Project1;
  4. var foo: array[0..99] of integer;
  5. begin
  6.   foo[0]:=1;
  7.   foo[1]:=1;
  8. end.
  9.  

Added lots of empty lines to get "foo" to the bottom.

Hovering foo: Getting a scrollbar, and can enter the hint with my mouse.

Did not try anchordocking.

Martin_fr

  • Administrator
  • Hero Member
  • *
  • Posts: 12131
  • Debugger - SynEdit - and more
    • wiki
Re: FpDebug popup problem
« Reply #6 on: April 27, 2024, 02:04:19 pm »
Just to add, the ability to move the mouse over the hint depends on going there in a straight line (without too much jitter).

Code: Pascal  [Select][+][-]
  1. procedure TSourceEditorHintWindowManager.HideAutoHintAfterMouseMoved;
  2. const
  3.   MaxJitter = 3;

If the hint is below the mouse, then if at any time you go up to a pos more than 3 pixel up from the closest y you had to the hint => then the hint closes.

Same If you are outside further to the left (or right) than the hints borders.


This may need fixes for DPI...

440bx

  • Hero Member
  • *****
  • Posts: 6093
Re: FpDebug popup problem
« Reply #7 on: April 27, 2024, 02:13:12 pm »
440bx image looks like he also does not have it => but better if he can confirm.
You're right.  I don't have anchor docking.
FPC v3.2.2 and Lazarus v4.0rc3 on Windows 7 SP1 64bit.

Martin_fr

  • Administrator
  • Hero Member
  • *
  • Posts: 12131
  • Debugger - SynEdit - and more
    • wiki
Re: FpDebug popup problem
« Reply #8 on: April 27, 2024, 02:39:43 pm »
The I don't currently know what may be causing it.

DPI settings? Though, I tried different ones.

Something in the text? Maybe some text content is incorrectly measured.
Try
- TForm (no debug)
- my sample code
« Last Edit: April 27, 2024, 02:41:36 pm by Martin_fr »

440bx

  • Hero Member
  • *****
  • Posts: 6093
Re: FpDebug popup problem
« Reply #9 on: April 27, 2024, 03:00:20 pm »
I made a "short" (cannibalized) version of the program that exhibits the problem.  Hopefully, the problem will appear in your machine as well which would probably help determine the cause.  It's a complete project, that way we should have the same (or at least very similar) settings.

The attached screenshot is from running the attached program and is there to show the "conditions" to trigger the problem.

ETA:

watch out: there is an ENDLESS LOOP in the program.  You'll have to forcefully terminate it (or fix it.)

ETA:

change line 305 to
Code: Pascal  [Select][+][-]
  1.       for hli := 0 to 1 do
that's gets rid of the infinite loop.

« Last Edit: April 27, 2024, 03:08:55 pm by 440bx »
FPC v3.2.2 and Lazarus v4.0rc3 on Windows 7 SP1 64bit.

Martin_fr

  • Administrator
  • Hero Member
  • *
  • Posts: 12131
  • Debugger - SynEdit - and more
    • wiki
Re: FpDebug popup problem
« Reply #10 on: April 27, 2024, 03:18:59 pm »
I tested on Win10 and 7 both 64bit => works fine here.

For good measure, I also tested the current 3.2 release.

Different distances to the screen bottom, even hiding part of the source edit behind the taskbar / and using a screen with taskbar on the side.
« Last Edit: April 27, 2024, 03:22:10 pm by Martin_fr »

Martin_fr

  • Administrator
  • Hero Member
  • *
  • Posts: 12131
  • Debugger - SynEdit - and more
    • wiki
Re: FpDebug popup problem
« Reply #11 on: April 27, 2024, 03:26:23 pm »
Maybe a font issue? Though I don't know which font the hint uses, if it follows the editor, or is system default, or  ....

440bx

  • Hero Member
  • *****
  • Posts: 6093
Re: FpDebug popup problem
« Reply #12 on: April 27, 2024, 03:50:11 pm »
Looking at WooBean's screenshot, he uses a different font and experiences the problem.

One interesting thing in his screenshot is that the font in his popup window is different than the font in our popup window.

At least we know it's something in the environment settings that causes the problem, not something in the source code.

I tried it with v3.2 and there is no problem with that version.  It seems that some change in v3.99's code triggers the problem.  Attached is a screenshot of v3.2 and the popup window is as you described it in an earlier post.

My guess at this time is that the problem is caused by an environment setting whose handling/code changed from v3.2 to v3.99
FPC v3.2.2 and Lazarus v4.0rc3 on Windows 7 SP1 64bit.

440bx

  • Hero Member
  • *****
  • Posts: 6093
Re: FpDebug popup problem
« Reply #13 on: April 27, 2024, 10:26:27 pm »
@Martin,

Just a thought and it is a long shot... my monitor resolution is 1920 x 1200 true color (32 bit)

DPI is 100% (96 pixels per inch)  "Use Windows XP style DPI scaling" is checked and greyed, IOW, the current DPI setting prevents changing it.

Maybe if you can set your monitor to those settings you'd experience the problem too ? (which might then help determine its exact cause in the code.)


FPC v3.2.2 and Lazarus v4.0rc3 on Windows 7 SP1 64bit.

Martin_fr

  • Administrator
  • Hero Member
  • *
  • Posts: 12131
  • Debugger - SynEdit - and more
    • wiki
Re: FpDebug popup problem
« Reply #14 on: April 27, 2024, 11:39:39 pm »
I have already identical DPI settings on my Win 7 machine.

The resolution is different, as is the screen size => and as I have set it to follow the size of the Window given by the VM, I did approximate your settings.
Still getting the scrollbar.

------------------
There is somewhere a change in 3.99 about the hint size not being correct. (I am to busy to go looking). But then you should still be able to move the mouse over the hint.

If you have code tool hints (with location of declaration), does it show the text for the declaration in blue / link)?

 

TinyPortal © 2005-2018