Skip to content
This repository was archived by the owner on Apr 5, 2024. It is now read-only.

Commit a337ea8

Browse files
spriest487Simon Priest
authored and
Simon Priest
committed
Fixed "Load More Stack Frames" loading the wrong set of frames.
When we get a request to load more frames, there's a `startFrame` property in the arguments which was previously ignored.
1 parent a899224 commit a337ea8

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

UnityDebug/UnityDebugSession.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -630,6 +630,7 @@ public override void StackTrace(Response response, dynamic arguments)
630630
{
631631
Log.Write($"UnityDebug: StackTrace: {response} ; {arguments}");
632632
int maxLevels = GetInt(arguments, "levels", 10);
633+
int startFrame = GetInt(arguments, "startFrame", 0);
633634
int threadReference = GetInt(arguments, "threadId", 0);
634635

635636
WaitForSuspend();
@@ -653,7 +654,7 @@ public override void StackTrace(Response response, dynamic arguments)
653654
{
654655
totalFrames = bt.FrameCount;
655656

656-
for (var i = 0; i < Math.Min(totalFrames, maxLevels); i++)
657+
for (var i = startFrame; i < Math.Min(totalFrames, startFrame + maxLevels); i++)
657658
{
658659
var frame = bt.GetFrame(i);
659660

0 commit comments

Comments
 (0)