Link to home
Start Free TrialLog in
Avatar of huangs3
huangs3Flag for Canada

asked on

How to find the first line of javascript code-behind of a web page button.

Hi Experts,

I am working on a website that have dynamically generated web pages, in which the html for UI controls are dynamically generated from server side and the events of the UI controls (I believe) are dynamically bound to javascript functions. The javascrpt code behind the page is very long and minified/uglified.

There is a button on the web page. I believe its click event is bounded to some javascript event handler because clicking it will update the page without causing any network traffic. I want to debug the code-behind step by step but could find that section of code to set the break point in F12 Developers Tool because the code is too complicated. Is there any method/tool to help me find that line of code?

I am using IE 11 and Chrome.

Thank you!
ASKER CERTIFIED SOLUTION
Avatar of leakim971
leakim971
Flag of Guadeloupe image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of huangs3

ASKER

leakim971's suggestion is to make the code readable.
you did not read my comment, I never say to go to DOM explorer but to the source tab and to click on the accolades : { }
the accolades are not easy to find at the first look, but I'm pretty sure you will find them
check this : https://raygun.com/blog/wp-content/uploads/2016/05/Screenshot-2016-05-23-13.52.08.png
Avatar of huangs3

ASKER

Hi leakim971, I did try the {} in chrome and it does made the code more readable. My previous comment is not a follow up for your comment, but another different approach used in IE 11. Sorry for the confusion.
Avatar of huangs3

ASKER

problem resolved
don't expect the browser to find somewhere the original code, but you should find a "click" key word