Debugger: Watches, display "<disabled>" instead of last known value, if watch is disabled.

This commit is contained in:
Martin 2022-04-07 02:24:48 +02:00
parent 3651027d61
commit 1c70c5f1f8

View File

@ -1015,7 +1015,7 @@ begin
FCurrentWatchInUpDateItem := AWatch;
try
tvWatches.NodeText[VNode, COL_WATCH_EXPR-1]:= AWatch.Expression;
if AWatch.HasAllValidParents(GetThreadId, GetStackframe) then begin
if AWatch.Enabled and AWatch.HasAllValidParents(GetThreadId, GetStackframe) then begin
WatchValue := AWatch.Values[GetThreadId, GetStackframe];
if (WatchValue <> nil) and
( (GetSelectedSnapshot = nil) or not(WatchValue.Validity in [ddsUnknown, ddsEvaluating, ddsRequested]) )
@ -1058,6 +1058,9 @@ begin
end;
end
else
if not AWatch.Enabled then
tvWatches.NodeText[VNode, COL_WATCH_VALUE-1]:= '<disabled>'
else
if (GetSelectedSnapshot = nil) and
(DebugBoss <> nil) and (DebugBoss.State in [dsPause, dsInternalPause])
then