How to debug locally
To do this, download the full Moonshine project and copy the debug extension folder into your project's file path. You can then add the two highlighted lines of code below, which will add the debug engine and the local debug UI to your page. Remember to include the data-ui-url; the script will need this to know where to find the html files for the UI in your setup.
Make sure you add the lines after you include the Moonshine VM and before you load any Lua scripts, as shown.
<script src="/js/moonshine/moonshine.min.js"></script> <script src="/js/moonshine/extensions/debug/debug.moonshine.js"></script> <script src="/js/moonshine/extensions/debug/local.debug.moonshine.js" data-ui-url="/js/moonshine/extensions/debug/ui"></script> <script> var vm = new shine.VM(); vm.load('./lua/hello.lua.json'); </script>