Debug and validation tools/workflows
kennybytes opened this issue ยท 5 comments
Are there any tools/workflows that I can use for debugging the scripts that I create in scriptcraft? I find some of the error messages that come up in-game can be a little vague.
On another point - is there any way to create a player entity and have it execute actions? I'd like the opportunity to test some event handlers I've created on some player-based actions. It would be great if it was possible to run tests offline (and not have to run the minecraft client) and see it they work.
I'm still pretty new to the minecraft modding scene, any advice would be appreciated. Let me know if my questions are too vague!
Hey @FFAxKenny
Those are great questions. I really wish the debugging workflow was better. In short, I haven't had much success running ScriptCraft in debug mode with the latest NetBeans IDE (which is supposed to have better support for Nashorn - Java8's JS engine).
On the Unit-testing front, things aren't good either. I haven't created a Unit test runner for MC modding (though that's not to say that one doesn't exist) which could have Mock player objects trigger events.
Hi @FFAxKenny,
Re debugging, we've faced the same issues when using ScriptCraft with CoderDojo Lund ninjas.
For now, we've created these two resources:
https://github.com/mickej/arrowgame-scriptcraft#exploring-the-target, to teach the basics of how to try out code piecemeal in the UI.
http://lund.coderdojo.se/2015/03/vanliga-fragor-om-scriptcraft-faq.html (currently in Swedish), with some basic troubleshooting tips. How about we start a ScriptCraft FAQ (in English)?
Forgot to add that one of the challenges is to challenge (& teach) ninjas to read and parse the error printouts. Perhaps a few examples of interpreting error messages in the console windows could come in useful. What do you think?
In the CoderDojo non-curriculum based context, I've found one fundamental skill is for ninjas to be able to read and follow written step by step instructions. Perhaps another crucial skill is the one mentioned above, parsing error messages. Even simple error messages can be intimidating, in my experience.
@FFAxKenny
So, I translated the FAQ part into English: http://lund.coderdojo.se/2015/04/frequently-asked-questions-about.html
@walterhiggins: would you like to host an FAQ on your ScriptCraft github? If so, where?