| I recently pre-ordered and got access to the original wc3 which they've since patched with updates. I started working on a new custom map, which now has support for Lua and all kinds of new natives like UI natives that allow you to completely customize the UI. Unfortunately, the debugging tools are abysmal. There is currently a player desync happening in multiplayer in my map (somehow different players disagree with their local emulation), but I am given absolutely zero information about it. No stack traces, there's no way to add breakpoints or logs, prints slow things down to a crawl and so aren't really reasonable to try to debug with either. I've done manual tests slowly by removing parts of code, but due to the random nature of the desync, it's really challenging to solve anything this way. Even if I remove some modules and can't get a desync anymore, doesn't mean it's fixed - it's possible I just never hit the specific circumstance that causes it. Whenever errors occur during load, I just get an error dialog with an empty box. Whenever errors occur during runtime, it just stifles the error and continues without logging or warning or anything. Lua has `debug.traceback()` but it seems Blizzard has prevented calling it. It's like trying to code without a compiler, without stack traces and without a debugger. Very challenging. I'm extremely excited for reforged, but I really hope there are better debugging tools added for Lua (perhaps for JASS as well, although I'm not as familiar with the need there). If anyone from Blizzard is reading this, I'd say that's my number one concern right now. |
As for desyncs there is https://www.hiveworkshop.com/threads/desync-checker-for-jass...
The archive contains text files which are very helpful in understanding which functions are responsible for desyncs.