mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-06-18 19:48:14 +02:00
Debugger: Watches, fixed displaying "len" prefix for arrays
This commit is contained in:
parent
e685106a2f
commit
02d88b37e8
@ -1214,14 +1214,17 @@ begin
|
|||||||
if (WatchValue.Validity = ddsValid) and (WatchValue.ResultData <> nil) then begin
|
if (WatchValue.Validity = ddsValid) and (WatchValue.ResultData <> nil) then begin
|
||||||
WatchValueStr := FWatchPrinter.PrintWatchValue(WatchValue.ResultData, WatchValue.DisplayFormat);
|
WatchValueStr := FWatchPrinter.PrintWatchValue(WatchValue.ResultData, WatchValue.DisplayFormat);
|
||||||
WatchValueStr := ClearMultiline(DebugBoss.FormatValue(WatchValue.TypeInfo, WatchValueStr));
|
WatchValueStr := ClearMultiline(DebugBoss.FormatValue(WatchValue.TypeInfo, WatchValueStr));
|
||||||
|
if (WatchValue.ResultData.ValueKind = rdkArray) and (WatchValue.ResultData.ArrayLength > 0)
|
||||||
|
then tvWatches.NodeText[VNode, COL_WATCH_VALUE-1] := Format(drsLen, [WatchValue.ResultData.ArrayLength]) + WatchValueStr
|
||||||
|
else tvWatches.NodeText[VNode, COL_WATCH_VALUE-1] := WatchValueStr;
|
||||||
|
end
|
||||||
|
else begin
|
||||||
if (WatchValue.TypeInfo <> nil) and
|
if (WatchValue.TypeInfo <> nil) and
|
||||||
(WatchValue.TypeInfo.Attributes * [saArray, saDynArray] <> []) and
|
(WatchValue.TypeInfo.Attributes * [saArray, saDynArray] <> []) and
|
||||||
(WatchValue.TypeInfo.Len >= 0)
|
(WatchValue.TypeInfo.Len >= 0)
|
||||||
then tvWatches.NodeText[VNode, COL_WATCH_VALUE-1] := Format(drsLen, [WatchValue.TypeInfo.Len]) + WatchValueStr
|
then tvWatches.NodeText[VNode, COL_WATCH_VALUE-1] := Format(drsLen, [WatchValue.TypeInfo.Len]) + WatchValue.Value
|
||||||
else tvWatches.NodeText[VNode, COL_WATCH_VALUE-1] := WatchValueStr;
|
else tvWatches.NodeText[VNode, COL_WATCH_VALUE-1] := WatchValue.Value;
|
||||||
end
|
end;
|
||||||
else
|
|
||||||
tvWatches.NodeText[VNode, COL_WATCH_VALUE-1] := WatchValue.Value;
|
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
tvWatches.NodeText[VNode, COL_WATCH_VALUE-1]:= '<not evaluated>';
|
tvWatches.NodeText[VNode, COL_WATCH_VALUE-1]:= '<not evaluated>';
|
||||||
|
Loading…
Reference in New Issue
Block a user