Set an XHR breakpoint - Firefox Developer Tools 编辑

An XHR (XMLHttpRequest) breakpoint breaks code execution when an XHR request is dispatched so that you can examine the current state of the program. You can break on all requests or on those that include a specific URL. To turn on the feature:

  1. Open the debugger
  2. Click on "Pause on any URL" which acts as a wild card, causing the code to pause on any call, or,
  3. Click the plus sign next to the XHR breakpoints header, enter the URL in which you are interested, and press Enter.

Note: If you enter a key word instead of a URL, code execution will pause on any call to a URL that contains that keyword.

When your code breaks on an XHR request, the righthand pane will have two additional sections:

Call stack
The list of functions that were executed in order ot get to the currently executing code. Click on an item in the call stack to jump to the associated line in the code display.
Scopes
A list of the values that are in scope in the function, method, or event handler where the break occurred.

Inline variable preview

New in Firefox 71, the source pane now gives you an instant preview of the variables on each line of code you've stepped through. See Set a breakpoint > Inline variable preview for more information.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据

词条统计

浏览:97 次

字数:2056

最后编辑:7 年前

编辑次数:0 次

    我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
    原文