Is there any browser extension or any other way to detect which javascript functions do I trigger by pressing a button or a link? I know the basics of JS but I need to find which function is called by one event, but I cannot find it in the .js file, because the guy who wrote it was a total madman and named every variable with a single letter, so I want to find the specific part, instead of going through the whole file.
Asked
Active
Viewed 576 times
-1
-
1"total madman" -- are you sure you are not looking at a minified/uglified version of the code? – Jeremy Harris Feb 28 '20 at 20:09
-
Also, use Event Listener Breakpoints: https://stackoverflow.com/questions/18877190/chrome-debugging-break-on-next-click-event – Jeremy Harris Feb 28 '20 at 20:09
-
https://stackoverflow.com/questions/446892/how-to-find-event-listeners-on-a-dom-node-when-debugging-or-from-the-javascript – Mickael B. Feb 28 '20 at 20:31
1 Answers
1
You may use chrome dev tool and a breakpoint directly from that element.
Chrome Dev Tool:
hope it will help.

Nitin Bisht
- 5,053
- 4
- 14
- 26

German
- 1,126
- 8
- 20
-
-
Hi! I edited my answer and include a screenshot image: -You need to right click on the button with your mouse and click inspect -Once chrome devtool open try to do whats on the image screenshoot Then try to click everything that has red line or red box; – German Feb 28 '20 at 21:10