summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2019-07-01 09:51:42 +0800
committer最萌小汐 <sumneko@hotmail.com>2019-07-01 09:51:42 +0800
commit198fe82f74531b0293d17d5a51d14e23264f2004 (patch)
treebd84da7b7a60b06727bfa9c28c82bf3c074c1928
parentf0bfb047bfb81b6f11400939ad736b7267e08938 (diff)
parent82833f9fe73869fc22577c40b4b0fcb9afaa2740 (diff)
downloadlua-language-server-198fe82f74531b0293d17d5a51d14e23264f2004.zip
Merge commit '82833f9fe73869fc22577c40b4b0fcb9afaa2740' into emmy-meta
-rw-r--r--server/debugger.lua7
-rw-r--r--server/main.lua2
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'