Error_404
Error_404

Reputation: 29

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() ?

Upvotes: 0

Views: 1313

Answers (1)

Tschallacka
Tschallacka

Reputation: 28722

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.

Upvotes: 3

Related Questions