N
N
NewTypes2014-03-13 09:55:54
JavaScript
NewTypes, 2014-03-13 09:55:54

How in Google Chrome after loading or during javascript debugging to find variables containing a specific value?

Honestly, I don’t understand why I don’t see such functionality right away. Tried CTRL+F on all Dev tools areas.
Has no one had a similar problem? Let's say that a page is loaded and we need to find all the functions and variables that contain a certain value. In some places, this can reduce the time of parsing the code.

Answer the question

In order to leave comments, you need to log in

5 answer(s)
Y
Yuri Lobanov, 2014-03-13
@iiil

Honestly, I don’t understand why I don’t see such functionality right away.

You are looking for such functionality precisely because you do not understand. Give an example of when you needed this. Without "let's say", but a real example.

A
akashtrih, 2014-03-13
@akashtrih

learn.javascript.ru/debugging-chrome

A
Alexey, 2014-03-13
@Alexious_sh

Some very strange task. The debugger is designed to debug your code, and it implies that you yourself know what you need and where it is located. I can’t even imagine the reason for the need for the described functionality ...

M
maxaon, 2014-03-13
@maxaon

Um, a very strange desire. May I ask - why? It never occurred to me to search by value. It is unlikely that there is such a thing anywhere, not to mention devtools.
There is a watch expression that allows you to calculate values ​​in the scope of the breakpoint. There has always been enough.

P
Pavel Volintsev, 2014-04-24
@copist

Don't forget that JavaScript has anonymous functions, closures, and scope. You can't find something without a breakpoint and a variable name.
HTML could be changed via $(...).html() or via $(...).append(...) or even document.getElementById(...).innerHTML = ' ... '
The task does not have solutions.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question