There is debugger functionality directly in netsuite, for server user event you have to change the deployment to Testing, be the script owner, then trigger the even. Also possible to debug restlet, a bit more complex, and you can debug client script directly in console.