Forum > Editor

watch window - copy value of a string - capped!

(1/2) > >>

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?

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...)

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.

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.....

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)

locals window should use the bigger limits


[0] Message Index

[#] Next page

Go to full version