Lua debugger part 1

This commit is contained in:
kepler155c@gmail.com
2020-05-23 21:44:55 -06:00
parent 2c27787f27
commit cb58a553f5
11 changed files with 923 additions and 349 deletions

28
debugger/example.lua Normal file
View 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')