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

Fixed "Load More Stack Frames" loading the wrong set of frames. #113

Merged
merged 1 commit into from
Nov 28, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion UnityDebug/UnityDebugSession.cs
Original file line number Diff line number Diff line change
Expand Up @@ -630,6 +630,7 @@ public override void StackTrace(Response response, dynamic arguments)
{
Log.Write($"UnityDebug: StackTrace: {response} ; {arguments}");
int maxLevels = GetInt(arguments, "levels", 10);
int startFrame = GetInt(arguments, "startFrame", 0);
int threadReference = GetInt(arguments, "threadId", 0);

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

for (var i = 0; i < Math.Min(totalFrames, maxLevels); i++)
for (var i = startFrame; i < Math.Min(totalFrames, startFrame + maxLevels); i++)
{
var frame = bt.GetFrame(i);

Expand Down