简体   繁体   中英

Is there a way to search all the local and global variables for a value in javascript when a breakpoint is hit in devtools?

Is there a way to search all the local and global variables for a value in Javascript when a breakpoint is hit in devtools? For example, I know there's a value 'John Smith' held by some variable. I want to locate that variable. I don't know which variable it is. It would be nice if it can search through collections and arrays as well. Either a built-in feature in one of the browsers or a code snippet I can run.

据我所知,DevTools均不允许按其值搜索变量,它们仅在停止脚本执行时列出按其作用域分组的变量和属性。

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