Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Check which JavaScript function is run after clicking button in Internet Explorer

Tags:

javascript

Is there any way or tools I can check which JavaScript function is run after clicking a button in Internet Explorer?

like image 846
Billy Avatar asked Nov 06 '22 17:11

Billy


1 Answers

Try the IE8 Script Debugger (under Developer tools (F12)). The Developer Tools have several tabs, one of them is "Script". There, you need to use "start debugging" button (it changes to "stop debugging", as seen in screenshot), and then look for a button with the "pause" (||) symbol on the same toolbar. Note that the

activating Developer Tools
(source: piskvor.org)
break all button
(source: piskvor.org)

It allows you to set "break on next instruction"; do that and the debugger will open on the next line of JS to be executed. If you step through all the event handlers for the button, you'll see what is called there.

If you have some control over the page, you may want to disable the mouseover and similar handlers, as those will also trigger the debugger.

like image 83
Piskvor left the building Avatar answered Nov 14 '22 20:11

Piskvor left the building