Skip to content
Advertisement

Chrome Developer Tools | Find in which script a function is

Is there a way to find where a function is placed into a script? Like:

<div onclick="sayHello()">Hello</div>

In which script is the function sayHello() ?

Advertisement

Answer

hit f12, click on the console tab

type sayhello and hit enter

You’ll see something like:
snip of function in devtools

Then double click on the line that appeared under your line.f (e){.....

That will jump you to the correct code.

User contributions licensed under: CC BY-SA
3 People found this is helpful
Advertisement