zerobranestudio debug main.lua ok but require can't set breakpoint

113 Views Asked by At

I'm using Lua in the unity3d engine. I used ZeroBrane Studio to debug my Lua code, but some breakpoints are never fired. I call "Main.lua" by load buffer c API, I set breakpoints at the beginning of the Main.lua, and it is fired. Main.lua looks like this:

print("main.lua begin.")
print(package.path)
require "mytest.lua"
mytest_func()

mytest.lua looks like this:

print("mytest.lua")
print("test zerobranestudio debug")
function mytest_func()
    print("mytest_func called")
end

the breakpoints in mytest.lua cannot be fired. I checked for ZeroBrane Studio's FAQ but still can't figure out the reason why breakpoints in required Lua file can't be fired. Any advice appreciated!

0

There are 0 best solutions below