mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-10 06:08:17 +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
|
||||
WatchValueStr := FWatchPrinter.PrintWatchValue(WatchValue.ResultData, WatchValue.DisplayFormat);
|
||||
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
|
||||
(WatchValue.TypeInfo.Attributes * [saArray, saDynArray] <> []) and
|
||||
(WatchValue.TypeInfo.Len >= 0)
|
||||
then tvWatches.NodeText[VNode, COL_WATCH_VALUE-1] := Format(drsLen, [WatchValue.TypeInfo.Len]) + WatchValueStr
|
||||
else tvWatches.NodeText[VNode, COL_WATCH_VALUE-1] := WatchValueStr;
|
||||
end
|
||||
else
|
||||
tvWatches.NodeText[VNode, COL_WATCH_VALUE-1] := WatchValue.Value;
|
||||
then tvWatches.NodeText[VNode, COL_WATCH_VALUE-1] := Format(drsLen, [WatchValue.TypeInfo.Len]) + WatchValue.Value
|
||||
else tvWatches.NodeText[VNode, COL_WATCH_VALUE-1] := WatchValue.Value;
|
||||
end;
|
||||
end
|
||||
else
|
||||
tvWatches.NodeText[VNode, COL_WATCH_VALUE-1]:= '<not evaluated>';
|
||||
|
Loading…
Reference in New Issue
Block a user