Closed robertlzj closed 2 years ago
The issue appears to be in the debugger and because it's using a table to collect the values, the result is Lua version-dependent (it's 5.1 in the local console and 5.3 in the remote console).
Can you check the following patch, as it fixes the issue for me:
diff --git a/lualibs/mobdebug/mobdebug.lua b/lualibs/mobdebug/mobdebug.lua
index 6d83fa28..36fa14c3 100644
--- a/lualibs/mobdebug/mobdebug.lua
+++ b/lualibs/mobdebug/mobdebug.lua
@@ -19,7 +19,7 @@ end)("os")
local mobdebug = {
_NAME = "mobdebug",
- _VERSION = "0.802",
+ _VERSION = "0.803",
_COPYRIGHT = "Paul Kulchenko",
_DESCRIPTION = "Mobile Remote Debugger for the Lua programming language",
port = os and os.getenv and tonumber((os.getenv("MOBDEBUG_PORT"))) or 8172,
@@ -731,9 +731,9 @@ local function stringify_results(params, status, ...)
if params.nocode == nil then params.nocode = true end
if params.comment == nil then params.comment = 1 end
- local t = {...}
- for i,v in pairs(t) do -- stringify each of the returned values
- local ok, res = pcall(mobdebug.line, v, params)
+ local t = {}
+ for i = 1, select('#', ...) do -- stringify each of the returned values
+ local ok, res = pcall(mobdebug.line, select(i, ...), params)
t[i] = ok and res or ("%q"):format(res):gsub("\010","n"):gsub("\026","\\026")
end
-- stringify table with all returned values
Hi, it works as expected, thank you~
In Local console
Everything is correct. But, in Remote console:
Win10 x64, Lua 5.3 x32