debug mode for js