SCENARIO: I am taking over management of a website where the former web developer has unfortunately spread out many relevant functions over many long JS fil
A possible way is to add a DOM breakpoint in Chrome Dev Tools
For that to work, you have to add the breakpoint before the style is added. That can be tricky, but you can force a breakpoint before loading any JavaScript by adding the following immediately after the HTML element in question
Try it on the following code
window.onload = function() {
document.querySelector('button').addEventListener('click', function() {
document.querySelector('p').style.border = '2px solid red';
});
}
Sample Paragraph