pkulchenko / ZeroBraneStudio

Lightweight Lua-based IDE for Lua with code completion, syntax highlighting, live coding, remote debugger, and code analyzer; supports Lua 5.1, 5.2, 5.3, 5.4, LuaJIT and other Lua interpreters on Windows, macOS, and Linux
http://studio.zerobrane.com/
Other
2.62k stars 519 forks source link

Displaying tables in console shows error during debugging #838

Open hurbutun opened 6 years ago

hurbutun commented 6 years ago

Hi,

I installed the latest version of ZeroBrane on MacOSX 10.13.1 last week. Now when I run it in debugging mode I cannot display any lua table on the console. I always get the following error: '"...ntents/ZeroBraneStudio/lualibs/mobdebug/mobdebug.lua:161: attempt to concatenate a table value"'

I replaced mobdebug.lua file in the package content with the one from the previous version which fixed the problem for me. I just wanted to let you know so that it is fixed in the next versions.

pkulchenko commented 6 years ago

Can you show the exact script you are running and the exact value that this error happens on (the shorter the script, the better)? I can't reproduce this on those values I tried with, so I suspect it has something to do with the tables you are trying to print.

hurbutun commented 6 years ago

I get the error in a function which is a part of a library that we are developing. I am attaching the function but I am not sure if it would be useful without the rest of the library.

I get the error when I put a marker on line 835 but I guess since it is a generic error it would have happened on any other line.

I hope this helps Model.txt

pkulchenko commented 6 years ago

@hurbutun, you are right, this doesn't help much as I don't know what tabel you are trying to show. Can you show the table you are trying to evaluate, as well as getmetatable(t) and tostring(t) expressions (assuming t is the table you are showing). Also, can you include a snapshot of how this table looks in the Stack view (expanded)? Thanks.

pkulchenko commented 6 years ago

@hurbutun, let me know if you have the details per my earlier message. Thanks.