Recent

Author Topic: watch window - copy value of a string - capped!  (Read 876 times)

Nicole

  • Hero Member
  • *****
  • Posts: 970
watch window - copy value of a string - capped!
« on: December 06, 2022, 10:58:07 am »
My SQL statements are complex and loong and - sometimes wrong.
Then I copy them from the window of the watched items to have a closer look at them.

Unfortunately all string variables are capped if the reach a certain length.
They are not only invisible of the window, but the "copy value" copies them with the short length as well.

What to do?

Zvoni

  • Hero Member
  • *****
  • Posts: 2315
Re: watch window - copy value of a string - capped!
« Reply #1 on: December 06, 2022, 11:43:08 am »
Write them to a "log/Text"-File.

btw: There should be an option in Watch Window to check a Value ("Auswerten" / "Überprüfen", weis gerade selbst nicht mehr)

I'm more confused, why you are watching your SQL-Statements.
This smells like concatenated SQL-Statements.

Post your "problematic" SQL-Statements in the Database-Forum, then we can help you.

Oh, and "complex and loooooong" SQL-Statements is "relative".
My last SQL-Statement i wrote for our production IBM DB2 is in Word at Fontsize 12 over two pages long, and goes over some 16 Tables (i think...)
« Last Edit: December 06, 2022, 11:44:51 am by Zvoni »
One System to rule them all, One Code to find them,
One IDE to bring them all, and to the Framework bind them,
in the Land of Redmond, where the Windows lie
---------------------------------------------------------------------
Code is like a joke: If you have to explain it, it's bad

Nicole

  • Hero Member
  • *****
  • Posts: 970
Re: watch window - copy value of a string - capped!
« Reply #2 on: December 06, 2022, 12:05:28 pm »
you are right with "auswerten / überprüfen", but, - there it is capped as well.
Sure, I can write to a log file, what I wanted to avoid.

Unfortunately you will not be able to help me.
I see an error-message, a value would be NULL, which is not.
And I see it, where it has worked before since years. :'(
I build this SQL-statement by a method, which is two pages long. Grabs the data from other units.
How I hate it to touch it.
At the moment I have no idea, how to work on.

Martin_fr

  • Administrator
  • Hero Member
  • *
  • Posts: 9791
  • Debugger - SynEdit - and more
    • wiki
Re: watch window - copy value of a string - capped!
« Reply #3 on: December 06, 2022, 12:24:23 pm »
Tools > Options > Debugger Backend

Assuming you have Fpdebug selected (but simlar for GDB)

Look in the property grid, there is a section "Mem Limits" => and if you unfold, there are limits for the max length to which a string will be evaluated. Increase it as needed.

This setting exists, because during debugging one may deal with corrupted data, and then huge amount of memory could be used.

This is why especially the limits for "stack" are set lower.
"stack" means "local variables" when shown as part of the stacktrace (iirc should not affect the watches window / not sure if it will affect the locals window).
They are always trash when you hit the "begin" line (because they get initialized in the "begin" line. But since FPC does not (yet) include that info, the debugger tries to eval them.
And in the stack (and locals) window, they are always present, even if you don't need them.

Did you try copy from the "locals" or "watches" window?


I am not sure, if "repeat count (in the "watch properties" (watches window) can override the limits.....

« Last Edit: December 06, 2022, 12:31:01 pm by Martin_fr »

Martin_fr

  • Administrator
  • Hero Member
  • *
  • Posts: 9791
  • Debugger - SynEdit - and more
    • wiki
Re: watch window - copy value of a string - capped!
« Reply #4 on: December 06, 2022, 12:37:10 pm »
I have to check, if the restrictive "stack" limits apply to the locals window too.

IIRC, the low defaults were chose because the values displayed as part of the stack-trace are all inlined, and hardly anyone would read really long data in the stacktrace.

But the locals window is of course different....
It does share the lack of control which variables are shown within..., but of course with "copy" long values make sense there... Something I might not have thought of, because I personally mainly use the watches window, even for locals / That is why feedback is always needed, otherwise the debugger will only work when used exactly like I use it)

---------
EDIT:
locals window should use the bigger limits
« Last Edit: December 06, 2022, 12:39:00 pm by Martin_fr »

Martin_fr

  • Administrator
  • Hero Member
  • *
  • Posts: 9791
  • Debugger - SynEdit - and more
    • wiki
Re: watch window - copy value of a string - capped!
« Reply #5 on: December 06, 2022, 12:41:25 pm »
The default limit for strings should be 10000 (10k).

Though if you have an older version, I am not sure if it had been lower to at some point in the past

Nicole

  • Hero Member
  • *****
  • Posts: 970
Re: watch window - copy value of a string - capped!
« Reply #6 on: December 06, 2022, 01:23:36 pm »
Thank you all for the answers and a special thanks to Martin:
I set it to 2000 and have at least my Query-string in full.

 

TinyPortal © 2005-2018