We are faced with a serious problem in the Editor-2.
We work daily in a bunch of “Editor-2 + Atom” and use print() for debugging.
Recently, we are constantly confronted with the fact that the console does not print print(), which we write in the lua-scripts.
Sometimes we are helped to delete the build cache and restart the editor. But it’s rather inconvenient to do after each new added line of code.
Often there is a situation where the print() is not printed right before the wrong line.
Perhaps you fold the prints in queue and critical errors prevent them from getting out?
Now these problems have become very critical.
Our systems - Win8 and Win10.
The amount of code in our project with which we work is about 1 mb, more than 100 lua-modules.
This is just one example that I photographed in September. There were many such cases before and after.
The situation has always been repeated: we are debugging a piece of code and at some point the print()s are no longer displayed in the console.
After that we delete the cache, reboot the computer and reinstall Defold. Sometimes it helps. Sometimes not.
Strange. I’ve seen examples of where the console gets slowed down by many prints but not ever any lost print statements. What if you print() to file instead? I would guess that that works as expected.
Yes, our project stored in a local directory on disk.
And yes, the problem still remains. Perhaps this is due to the fact that the project is big.
I can assume that the text editor updates the content autonomously from the builder. Thus, the code on the editor has already been updated, but the old one is used for the compiler. There is a feeling that the compiler ignores the latest changes in the text of the code.
@morgerion@geidnert We have sadly not been able to reproduce this issue. I’m guessing it has something to do with how we reload resources after detecting an external change, and the way your project is structured.
Is there any chance we could have a look at your project? Or a smaller project where this happens?
About undo. When reloading external changes we assume the undo information we hold is invalid and simply wipe it. Thats why you have no undo when using an external editor.
And the scrolling issue, well, we’ve honestly pretty much abandoned the current text editor in preference for a much improved to be released soonish
In both cases.
As a rule, this happens in large files (AbstractWindowLogic.lua, craft_gui.gui_script, ProcessLogic.lua, shop.gui_script) that contain many inclusions of other modules.
Bug still reproduced.
For now I helping guys with their big project (Family Age) and this bug reproduced often enough (with this project only).
I am working mac, and using only Defold editor 2 (without any external editor)