github.com/arnodel/golua@v0.0.0-20230215163904-e0b5347eaaa1/runtime/lua/debughooks.lua (about)

     1  -- Test debug hooks
     2  do
     3      local function bar() 
     4          local x = 1
     5      end
     6      local function foo()
     7          return bar()
     8      end
     9      local cofoo = coroutine.create(foo)
    10      debug.sethook(cofoo, print, "clr")
    11      coroutine.resume(cofoo)
    12      --> =call
    13      --> =line	7
    14      --> =tail call
    15      --> =line	4
    16      --> =return
    17      debug.sethook(cofoo)
    18  end