Separate JS and debug