with standard Alfresco, this is currently not possible. There is a way to enable remote debugging from Eclipse, but it isn't yet a very handy one. See my blog for details - which I saw by your comment you've already done. I am currently working on a project to provide an <a href="https://github.com/AFaust/alfresco-enhanced-script-environment">enhanced scripting environment in Alfresco</a> which will include the necessary support for Eclipse-based remote debugging. For now, the best option is to use the embedded Rhino debugger.