New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
remote console multi variables access bug #1149
Comments
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~ |
pkulchenko
added a commit
to pkulchenko/MobDebug
that referenced
this issue
Jun 17, 2022
pkulchenko
added a commit
that referenced
this issue
Jun 17, 2022
…ixes #1149). When an expression in Console returns multiple values with wholes (`nil` values), not all values were shown and the results were Lua version dependent. Now all values are shown for all versions.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
In Local console
Everything is correct.
But, in Remote console:
Win10 x64, Lua 5.3 x32
The text was updated successfully, but these errors were encountered: