mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-27 15:25:07 +02:00
Debugger: Fix eval watch hint in selected StackFrame
This commit is contained in:
parent
9f08e2006b
commit
5357d6a3f0
11
ide/main.pp
11
ide/main.pp
@ -11443,8 +11443,9 @@ var
|
||||
BaseURL, SmartHintStr, Expression: String;
|
||||
HasHint: Boolean;
|
||||
Opts: TWatcheEvaluateFlags;
|
||||
AtomStartPos, AtomEndPos, tid: integer;
|
||||
AtomStartPos, AtomEndPos, tid, st: integer;
|
||||
aWatch: TCurrentWatch;
|
||||
CStack: TIdeCallStack;
|
||||
begin
|
||||
//DebugLn(['TMainIDE.SrcNotebookShowHintForSource START']);
|
||||
if (SrcEdit=nil) then exit;
|
||||
@ -11512,8 +11513,12 @@ begin
|
||||
aWatch.Enabled := True;
|
||||
DebugBoss.CurrentWatches.EndUpdate;
|
||||
|
||||
tid := DebugBoss.Threads.CurrentThreads.CurrentThreadId;
|
||||
FHintWatchData.WatchValue := aWatch.Values[tid, 0] as TCurrentWatchValue;
|
||||
tid := DebugBoss.Threads.CurrentThreads.CurrentThreadId;
|
||||
st := 0;
|
||||
CStack := DebugBoss.CallStack.CurrentCallStackList.EntriesForThreads[tid];
|
||||
if CStack <> nil then
|
||||
st := CStack.CurrentIndex;
|
||||
FHintWatchData.WatchValue := aWatch.Values[tid, st] as TCurrentWatchValue;
|
||||
FHintWatchData.WatchValue.OnValidityChanged := @OnHintWatchValidityChanged;
|
||||
FHintWatchData.WatchValue.Value;
|
||||
OnHintWatchValidityChanged(FHintWatchData.WatchValue);
|
||||
|
Loading…
Reference in New Issue
Block a user