简体   繁体   中英

How do i see the current javascript running with chrome inspector?

I have this complicated slider that utilizes tons of animation. I'm trying to find what function is being called when the slider is triggered, so that I can assign an onClick even to an arbitrary link to activate the slider from outside the slider itself.

I've looked at the code though, and I'm at a loss where the function is. Also javascript console isnt logging anything. It would be nice to see what code is currently executing somehow. Is this possible?

Thanks!

One way to do this is with the Timeline tab. Make sure that only the Scripting checkbox is checked:

在此处输入图片说明

You'll need to click the "Record" button to start and stop collecting information.

You can hit the pause button (under the scripts tab) that will allow you to step through the code. If code is running when you hit it, it will stop it at the next (debuggable) running line.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM