diff options
-rw-r--r-- | server-beta/debugger.lua | 9 | ||||
-rw-r--r-- | server-beta/main.lua | 4 |
2 files changed, 8 insertions, 5 deletions
diff --git a/server-beta/debugger.lua b/server-beta/debugger.lua index 27cd9fe3..e8144de0 100644 --- a/server-beta/debugger.lua +++ b/server-beta/debugger.lua @@ -1,3 +1,4 @@ +local wait = ... local fs = require 'bee.filesystem' local extensionPath = fs.path(os.getenv 'USERPROFILE') / '.vscode' / 'extensions' log.debug('Search extensions at:', extensionPath:string()) @@ -46,10 +47,10 @@ local function tryDebugger() dbg:start(addr) log.debug('Debugger startup, listen port:', port) log.debug('Debugger args:', addr, root, path, cpath) + if wait == 'wait' then + dbg:wait() + end return dbg end -local suc, dbg = xpcall(tryDebugger, log.debug) -if suc then - return dbg -end +xpcall(tryDebugger, log.debug) diff --git a/server-beta/main.lua b/server-beta/main.lua index 91efcf34..f9be9e53 100644 --- a/server-beta/main.lua +++ b/server-beta/main.lua @@ -12,6 +12,8 @@ log.init(ROOT, ROOT / 'log' / 'service.log') log.info('Lua Lsp startup, root: ', ROOT) log.debug('ROOT:', ROOT:string()) -dofile(rootPath .. '/debugger.lua'):wait() +loadfile(rootPath .. '/debugger.lua') +-- 'wait' + local service = require 'service' service.start() |