From ef3417dab0f9db5a1e4156a500ee37347a084bcc Mon Sep 17 00:00:00 2001 From: John Livingston Date: Sun, 21 May 2023 11:23:57 +0200 Subject: [PATCH] Fix debug option. --- prosody/launcher.lua | 2 ++ 1 file changed, 2 insertions(+) diff --git a/prosody/launcher.lua b/prosody/launcher.lua index 056b42c4..c2f22268 100644 --- a/prosody/launcher.lua +++ b/prosody/launcher.lua @@ -5,6 +5,7 @@ local what = table.remove(arg, 1); if what == 'debug' then -- Special debug mode. Should not be used in production. + -- Note: i did not achieve to make it properly work (Prosody uses coroutines, and i did not manage to use breakpoints) print('Activating MobDebug...'); mobdebug_path = table.remove(arg, 1); mobdebug_host = table.remove(arg, 1); @@ -12,6 +13,7 @@ if what == 'debug' then local lua_path_sep = package.config:sub(3,3); local dir_sep = package.config:sub(1,1); package.path = package.path..lua_path_sep..mobdebug_path..dir_sep.."?.lua"; + require "mobdebug".checkcount = 1; require "mobdebug".start(mobdebug_host, mobdebug_port); require "mobdebug".coro(); what = table.remove(arg, 1);