I have built my own Gideros custom player for my game by exporting an empty Gideros project and adding all the needed external frameworks to it. It works great and my game is loading in it. However one thing is missing, Lua debugging. I can debug any of the Gideros examples using the built in Gideros Player but I cannot with my exported project. Not sure what I'm missing, how to enable this or if it's possible at all. Thanks in advance.
Comments
If you compiled your game and try to see debug logs in Gideros Studio then that won't work!
Steps to reproduce:
-launch an android Gideros Player
-Gideros Studio detects it the first time
-lauch app => OK
-Wifi connection closed/lost
-wifi reconnection => OK
-android phone shows in Gideros Studio device list => OK
-Gideros Studio buttons (play, stop, debug) flicker
-after that impossible to get Gideros Studio and Player to ever reconnect
Closing android player, closing Gideros Studio, clearing android apps cache, and restarting them all => impossible to launch the app on phone again, buttons still flicker, and phone is visible in Gideros Studio.
SOLVED IT:
- an instable wifi connection seems to break the reconnection of Gideros Studio and Gideros Player on the phone (android in my case)
- I uninstalled then reinstalled my custom android Gideros Player and this looks fine so far, I can play/stop my app and the buttons don't flicker in Gideros Studio no more
macOS Sonoma 14.2.1 / Apple M1
XCode 15.1
Gideros 2023.11
Likes: MoKaLux
(making zbs work again properly is probably my most - or only? - wished for gideros feature for 2024)
Likes: MoKaLux, troysandal
Fragmenter - animated loop machine and IKONOMIKON - the memory game
Likes: MoKaLux, pie
Likes: MoKaLux, pie
Just put it in your Gideros installation folder, backing up the previous one in case it breaks everything.
I had some success putting breakpoints and inspecting variables with this one, but I am not a regular ZBS user.
i added the new lua.dll to the gideros root folder but it does not seem to make a change.
i tested printing (only appears after i exit the player), breakpoint (not doing anything), watch (without breaking i cannot test it). also "gdrdaemon task kill" is still necessary between two runs of the player from zbs.
is there a specific zbs version you are using?
Fragmenter - animated loop machine and IKONOMIKON - the memory game
but then i get an error
[string "luabinding/compatibility.lua"]:79: in function require
sources/utils/mobdebug.lua:13: in function
and the 13th line contains:
local debug = require "debug"
perhaps you can share the mobdebug.lua you are using? i may have modified it when trying to make it work with luau.
Fragmenter - animated loop machine and IKONOMIKON - the memory game
Fragmenter - animated loop machine and IKONOMIKON - the memory game
local debug=debug
debug module is builtin
Fragmenter - animated loop machine and IKONOMIKON - the memory game
Likes: MoKaLux
so now the issue. that's how i did it in the past:
mobd=require('mobdebug').start("192.168.0.164")
but it gives error
[string "luabinding/compatibility.lua"]:79: Module mobdebug not found
stack traceback:
[string "luabinding/compatibility.lua"]:79: in function require
sources/main.lua:30: in function
now i'm a bit lost about what to exclude from execution etc (mobdebug, require). so a test project would be nice, even if only later.
thanks
Likes: MoKaLux
Fragmenter - animated loop machine and IKONOMIKON - the memory game
in any case there is already some progress, promising.
Fragmenter - animated loop machine and IKONOMIKON - the memory game
but still things are not working, so i would need a test project.
(one of my projects complains about missing mobdebug.lua even though another doesn't, which is one more thing i don't understand now, their setup seems identical).
Fragmenter - animated loop machine and IKONOMIKON - the memory game
With it I can set breakpoints in code executed after mobdebug.start(), for example in the onEnterFrame call.
Fragmenter - animated loop machine and IKONOMIKON - the memory game
Fragmenter - animated loop machine and IKONOMIKON - the memory game
Using Gideros 2024.1 (but the luau library I sent you should be enough), here is what I do:
1. Launch ZBS and open the project
2. Select 'Gideros' interpreter
3. Put a breakpoint, for example on line 14 in the onEnterFrame() function
4. Launch with F5
5. ZBS stops at line 14 and I can inspect variables and stack
so it indeed seems to work (also with zbs 2.01), i will let you know if there are additional observations.
one comment: running "gdrdaemon task kill" between consecutive runs of the player still seems necessary.
Fragmenter - animated loop machine and IKONOMIKON - the memory game
also, a print right after requiring mobdebug is not printed but if i put it later enough then it does. what does this depend on? can you make every print printed?
finally, after quitting the player, every print is repeated once again (with those prints appearing too which were not appearing (as being too close to require for example). can you make it that this does not happen?
overall, this is already a great improvement in using again zbs debugging, thanks.
Fragmenter - animated loop machine and IKONOMIKON - the memory game
- gideros_protocol.lua and json.lua should go in lualibs folder
- gideros-link.lua in interpreters
- The new interpreter in ZBS menu will be GiderosLink
Files: http://apps.giderosmobile.com/pre/gideroslink.zip
Fragmenter - animated loop machine and IKONOMIKON - the memory game
- It sends the project to the player with the help of gdrbridge (like before), but disconnects the daemon after that
- It then connects to the player directly through luasocket and so can control it (send the play command) and retrieves logs (prints) in real time.
- In the future it could implement debugging without the need for mobdebug, that is if ZBS ever gets a debugging API not centered around mobdebug only.
Likes: keszegh
Fragmenter - animated loop machine and IKONOMIKON - the memory game