【问题标题】:How to access and search code in debugger:///VM* files in Google Chrome Devtools如何在 Google Chrome Devtools 中的 debugger:///VM* 文件中访问和搜索代码
【发布时间】:2019-11-30 03:15:53
【问题描述】:

我想调试不是通过文件加载的脚本,这意味着它们通过eval 加载或从 iOS/Android 推送到浏览器的本机代码。

当我在 DevTools 控制台中写入 (function() {debugger}()) 时,浏览器会创建像 debugger:///VM132 这样的假文件,您可以在调试器断点中看到它。

我通常有很多 debugger:///VM***“文件”代码,但我无法访问它们,也无法在 DevTools 的任何地方看到 debugger:///VM 脚本的列表。 Sources 面板也没有显示任何这些。

此外,我使用 DevTools 搜索 CMD+option+F,而不是在 debugger:///VM 文件中搜索。

我怎样才能找到这些来源?

【问题讨论】:

    标签: javascript google-chrome-devtools javascript-debugger


    【解决方案1】:

    我注意到 Sources -> Search in anonymous and content scripts 下的 DevTools 设置中的选项。我得到了所有控制台脚本、调试器条件断点以及从 Native App 到 JS 的注入脚本。

    【讨论】:

      猜你喜欢
      • 2015-09-24
      • 2019-08-29
      • 2016-10-07
      • 2014-04-25
      • 2014-12-17
      • 2018-04-02
      • 2022-01-06
      相关资源
      最近更新 更多