如何在Google Chrome开发者工具中搜索范围变量? [英] How do I search through scope variables in Google Chrome Developer Tools?

查看:469
本文介绍了如何在Google Chrome开发者工具中搜索范围变量?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用Google Chrome开发者工具在javascript函数中设置断点。

I set a breakpoint in a javascript function with Google Chrome Developer Tools.

我在函数的范围变量中查找变量值为Fred 。如何在函数范围内的变量中搜索此值?

I am looking for a variable in the scope variables of the function with the value "Fred." How do I search for this value amongst the variables within the scope of the function?

推荐答案

您可以在Chrome DevTools中设置断点在特定行上,这是在所述变量的范围/上下文内。当浏览器执行到达断点时,您将可以访问其中的所有变量/函数以及全局范围。

You can set a breakpoint within Chrome DevTools on a particular line, that's within the scope/context of said variable. When browser execution reaches the breakpoint, you'll have access to all variable/functions within its, and the global, scope.

您还可以使用Chrome的控制台并输出任何在当前范围内可访问的变量。有关Chrome DevTools的详细信息,请访问:

You could also utilize Chrome's console and output any variable that's accessible within the current scope. For more information about Chrome DevTools visit:

https://developers.google.com/chrome-developer-tools/

这篇关于如何在Google Chrome开发者工具中搜索范围变量?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆