Contentsquare interview question

Describe how you will troubleshoot a Javascript code?