Skip to content

Instantly share code, notes, and snippets.

@EloB
Last active December 23, 2015 00:09
Show Gist options
  • Save EloB/6551420 to your computer and use it in GitHub Desktop.
Save EloB/6551420 to your computer and use it in GitHub Desktop.
When Iam debugging/developing huge javascript code base and with multiple javascript files that I haven't written myself. Then I often run into trouble with finding the actual code Iam looking for. "Event Listener Breakpoints" is a really neat feature in blink to find where the "magic" happends but 99.9% of the cases I land in a general framewor…
$(function() {
// Tons of code.
$('.btn').click(function() {
// Do something.
});
// Tons of code
});
$(function() {
// Tons of code
var el = document.getElementsByTagName('a')[0];
$(el).click(function() {
// I would easily and fast find this code.
// This is just a simple jQuery snippet for instance.
});
// Tons of code
});
<html>
<head>
<script src="/jquery.js"></script>
<script src="/file1.js"></script>
<script src="/file2.js"></script>
</head>
<body>
<a href="#" class="btn"></a>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment