Sometimes I think the best way to debug JavaScript is to pretend the bug is shy.
I whisper console.log into its ear and if it doesn't blush I add more console.log.
If it still won't blush, I rename the file and call it "ancient wisdom.md" and hope for the best.