diff options
Diffstat (limited to 'server')
-rw-r--r-- | server/debugger.lua | 7 | ||||
-rw-r--r-- | server/main.lua | 2 |
2 files changed, 3 insertions, 6 deletions
diff --git a/server/debugger.lua b/server/debugger.lua index a2f674b8..5315953a 100644 --- a/server/debugger.lua +++ b/server/debugger.lua @@ -38,14 +38,11 @@ local cpath = "/runtime/win64/lua54/?.dll" local path = "/script/?.lua" local function tryDebugger() - local remote = package.searchpath('remotedebug', debugPath:string() .. cpath) - local entry = package.searchpath('start_debug', debugPath:string() .. path) - local rdebug = package.loadlib(remote,'luaopen_remotedebug')() + local entry = assert(package.searchpath('debugger', debugPath:string() .. path)) local root = debugPath:string() local port = '11411' local addr = "127.0.0.1:" .. port - local dbg = loadfile(entry)(rdebug, root, path, cpath) - debug.getregistry()["lua-debug"] = dbg + local dbg = loadfile(entry)('windows', root) dbg:start(addr) log.debug('Debugger startup, listen port:', port) log.debug('Debugger args:', addr, root, path, cpath) diff --git a/server/main.lua b/server/main.lua index 61f17f2f..9ba8fc92 100644 --- a/server/main.lua +++ b/server/main.lua @@ -22,7 +22,7 @@ log.info('Lua Lsp startup, root: ', ROOT) log.debug('ROOT:', ROOT:string()) ac = {} ---xpcall(dofile, log.debug, rootPath .. 'debugger.lua') +xpcall(dofile, log.debug, rootPath .. 'debugger.lua') require 'utility' require 'global_protect' local service = require 'service' |