try {

YOUR JAVASCRIPT CODE

} catch (e) {
for (myBug in e) {
alert (“e["myBug +"] = “+e[myKey]);
}
}

Surround your JavaScript code with try catch,
run the code in your browser,
then you will see every error in your codes.

Also see:

Subscribe in reader