If it's stupid but works, it isn't stupid.
Chrome Developer Tools https://developers.google.com/chrome-developer-tools/docs/scripts-breakpoints