Start the tomcat in debug mode (ie)
c:\alfresco\tomcat\bin>catalina.bat jpda start
Refer :
http://mralfresco.blogspot.in/2012/09/how-to-enable-debugging-in-tomcat-6.html
Enable javascript debugging in alfresco
repository
Go to the below URL and click Enable button.
http://localhost:8080/alfresco/service/api/javascript/debugger
Now you will get a new javascript debugging
window to debug the javascript.
Hope this helps someone.