Strange information in Call Stack window while debugging

Reproduction Steps

1) Put this on a script:

local function b()
	print('b')
end

local function a()
	coroutine.wrap(function()
		b()
	end)()
end

a()
  1. Set a breakpoint on a() (line 11)
  2. Run
  3. Debug with step into (F11)

Expected Behavior

1) The call stack window should not show some lines like Line -1 [C]
2) When a function is called inside a coroutine, it should show the correct callback function a()

Actual Behavior

Opposite of above:



Issue Area: Studio
Issue Type: Other
Impact: High
Frequency: Constantly

2 Likes

It shows all call frames that Luau VM has.
One of them is an anonymous C language closure that is used to resume coroutines.
Could be improved by displaying an explanation.

I don’t get this, video shows

  • function ‘b’
  • unnamed function() that starts on line 6 (currently executes line 7)
  • unnamed C coroutine resume function that can be improved or removed I guess
  • function ‘a’
  • unnamed script global function
1 Like

So it’s not a bug, but a current feature, ok. If you could improve the display int this case, it will be appreciated.

When b() is called at line 7 and the Step Into goes to line 2, Call Stack window should show the original function a() at Frame 1, but it’s currently showing nothing:

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.

Just circling back here, this issue is fixed! Thanks again for the report.