Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Browser debug: how to see what Javascript functions was called after some action?

Maybe Firebug or Opera, Google Chrome tools allows it. Where to find it? how to use?

Example: I click the button and want to see what Javascript code fired up after that action.

like image 883
user1286094 Avatar asked Apr 07 '12 18:04

user1286094


People also ask

Is there a way to find out what JavaScript code is responsible for a particular effect in a Web page?

Open your page in Firefox with Firebug enabled. enter 0 in the textbox and click the button. Stop profiling. You will be able to see all the javascript functions which have executed due to your actions.

How can I see JavaScript in inspector?

You can also press F12 on your keyboard to open the web developer tool. In the top-left section of the developer tool, make sure Inspector (A) is selected at the top. In the condensed code under the Inspector header, find the <script> tag containing a link to a . js file (B).


1 Answers

In Google Chrome, you can open Developer Tools (Ctrl+Shift+J)

Choose Profiles tab, choose Collect JavaScript CPU Profile, click Start

When finish, click Stop and see the progress log...

like image 71
Nguyễn Hoàng Gia Avatar answered Oct 02 '22 13:10

Nguyễn Hoàng Gia