Lua debugger part 1
This commit is contained in:
28
debugger/example.lua
Normal file
28
debugger/example.lua
Normal file
@@ -0,0 +1,28 @@
|
||||
local function m2(a)
|
||||
return a
|
||||
end
|
||||
|
||||
local function method(times)
|
||||
local a = 2
|
||||
-- use step out to return out of method
|
||||
for _ = 1, times do
|
||||
a = a * a
|
||||
end
|
||||
return m2(a)
|
||||
end
|
||||
|
||||
print('before')
|
||||
-- breakpoint
|
||||
--dbg()
|
||||
print('after')
|
||||
|
||||
local i = 2
|
||||
print(i)
|
||||
local res = method(i)
|
||||
|
||||
dofile("rom/modules/main/cc/expect.lua")
|
||||
|
||||
print(res)
|
||||
print('result: ' .. res)
|
||||
|
||||
error('f')
|
||||
Reference in New Issue
Block a user