Lua API global Variable Viewer (gvv)

by Ritn

This is a debugging tool. This mod adds commands /gvv and others and a hotkey(Ctrl+Shift+V) to allow you to check _G and global table of map or each mods. Only admins can use command if it is multiplay game. You have to input some code for temporary accessibility or have to edit "control.lua" of other mod or map to access global table of the mod or map. See "Helper" tab for instructions.

Utilities
a month ago
1.0 - 2.1
4.16K

b [0.5.21 fixes] Error with remote calls in debugger

a month ago

While in debugger/vscode, want to view the storage of my mod in gvv, but get the following exception in gvv/modules/tree.lua:90
can't send LuaDebugAdapter through remote calls.
Resulting in this error https://i.imgur.com/zgJ8x3f.png
The storage variables can be viewed, but every tree refresh provokes the error.

Outside of vscode, it works without problem

a month ago

Hi, thanks for the report!

I found the cause: when running under the VS Code debugger, an LuaDebugAdapter object is present in the mod's _G. gvv tried to send it through remote.call, which Factorio doesn't allow, so the whole _G request failed. The storage tab also draws the mod's _G tree, which is why the error appeared on every refresh even though the storage values were displayed.

This is fixed in the next version (0.5.21): LuaDebugAdapter is now excluded and simply shown as "<LuaDebugAdapter>".

I couldn't test it under the debugger myself, so could you confirm that the error is gone once 0.5.21 is released? Also, which version of gvv were you using? Line 90 of tree.lua doesn't match the error in the current version, so I'd like to make sure nothing else is involved.

Thanks!

a month ago

Yaeh it works, thanks for the quick fix.

New response