failproof debugger call
This commit is contained in:
parent
1c47377dc1
commit
95bca26afe
1 changed files with 8 additions and 1 deletions
9
main.lua
9
main.lua
|
|
@ -1,7 +1,14 @@
|
|||
-- debug --
|
||||
if os.getenv("LOCAL_LUA_DEBUGGER_VSCODE") == "1" then
|
||||
DEBUG = true
|
||||
require("lldebugger").start()
|
||||
local lldebugger = require('lldebugger')
|
||||
lldebugger.start()
|
||||
---@diagnostic disable-next-line: undefined-field
|
||||
local run = love.run
|
||||
function love.run(...)
|
||||
local f = lldebugger.call(run, false, ...)
|
||||
return function(...) return lldebugger.call(f, false, ...) end
|
||||
end
|
||||
else DEBUG = false end
|
||||
print('debug:', DEBUG)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue