failproof debugger call

This commit is contained in:
yuki 2025-11-11 21:13:58 -03:00
parent 1c47377dc1
commit 95bca26afe

View file

@ -1,7 +1,14 @@
-- debug -- -- debug --
if os.getenv("LOCAL_LUA_DEBUGGER_VSCODE") == "1" then if os.getenv("LOCAL_LUA_DEBUGGER_VSCODE") == "1" then
DEBUG = true 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 else DEBUG = false end
print('debug:', DEBUG) print('debug:', DEBUG)