Skip to content
Snippets Groups Projects
Commit 82833f9f authored by actboy168's avatar actboy168
Browse files

修复调试器

parent f3f86af8
No related branches found
No related tags found
No related merge requests found
...@@ -38,14 +38,11 @@ local cpath = "/runtime/win64/lua54/?.dll" ...@@ -38,14 +38,11 @@ local cpath = "/runtime/win64/lua54/?.dll"
local path = "/script/?.lua" local path = "/script/?.lua"
local function tryDebugger() local function tryDebugger()
local remote = package.searchpath('remotedebug', debugPath:string() .. cpath) local entry = assert(package.searchpath('debugger', debugPath:string() .. path))
local entry = package.searchpath('start_debug', debugPath:string() .. path)
local rdebug = package.loadlib(remote,'luaopen_remotedebug')()
local root = debugPath:string() local root = debugPath:string()
local port = '11411' local port = '11411'
local addr = "127.0.0.1:" .. port local addr = "127.0.0.1:" .. port
local dbg = loadfile(entry)(rdebug, root, path, cpath) local dbg = loadfile(entry)('windows', root)
debug.getregistry()["lua-debug"] = dbg
dbg:start(addr) dbg:start(addr)
log.debug('Debugger startup, listen port:', port) log.debug('Debugger startup, listen port:', port)
log.debug('Debugger args:', addr, root, path, cpath) log.debug('Debugger args:', addr, root, path, cpath)
......
...@@ -22,7 +22,7 @@ log.info('Lua Lsp startup, root: ', ROOT) ...@@ -22,7 +22,7 @@ log.info('Lua Lsp startup, root: ', ROOT)
log.debug('ROOT:', ROOT:string()) log.debug('ROOT:', ROOT:string())
ac = {} ac = {}
--xpcall(dofile, log.debug, rootPath .. 'debugger.lua') xpcall(dofile, log.debug, rootPath .. 'debugger.lua')
require 'utility' require 'utility'
require 'global_protect' require 'global_protect'
local service = require 'service' local service = require 'service'
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment