pandorabox-io / in-game

Random code and stuff for in-game things
MIT License
3 stars 0 forks source link

Lua controller debugging #294

Open S-S-X opened 2 years ago

S-S-X commented 2 years ago

Huhhila Another idea, for luac: add some kind of wrapper for debug.lua_gethookcount (and/or debugging/profiling features in luatool instead of luac itself, but that could need far more effort)

Originally posted by @Klaranth in https://github.com/pandorabox-io/in-game/issues/248#issuecomment-1159792347

Klaranth commented 1 year ago

Sher Khan Simple, yet necessary again regarding lua controllers, Line numbers Visible view of line numbers would be easy to debug code instead of counting lines, where error is mentioned

SX Unfortunately I think line numbers for in game code editor isn't really trivial thing to implement. And, while it should be possible, results probably wont be very good. But maybe someone has acceptable solution, I guess if it is possible in a way that's actually usable then someone probably has done it already. If custom scroll works with multi line text fields then that might be possible solution, one very important thing is that line numbers and such extra stuff can be positioned accurately with actual code lines with any font or font size. So if it has to be multi element then have to make sure that eveything about text rendering works exactly same.

Klaranth commented 1 year ago

Sher Khan Idea regarding - Save button in Lua or Moon controller, before executing it? Sometimes we have to lookup technical names and forgot to save the code, and all is lost. Also when writing code, we don't want to execute it immediately. Just save it and complete the code later.