-
Notifications
You must be signed in to change notification settings - Fork 103
某些情况下step in可能没办法进入协程代码 #345
Copy link
Copy link
Open
Description
function CoFunc()
print("Line 1")
coroutine.yield()
print("Line2")
end
local co = coroutine.create(CoFunc) -- Add break point here
coroutine.resume(co)
coroutine.resume(co)代码如上所示,运行到断点之后,按step in(f11)的话,执行到后面两行的时候按step in可以step到协程里;
运行到断点之后,按step over(f10)的话,执行到后面两行的时候按step in无法step到协程里,跟step over的效果一样。
原因可能是在coroutine.create调用之前,改变了当前lua_State的hookmask,导致协程的hookmask少了LUA_HOOKLINE。
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels