如何在 Chrome 中设置 DOM 断点 [英] how to set DOM Breakpoints in chrome

查看:47
本文介绍了如何在 Chrome 中设置 DOM 断点的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试按照此处的教程进行操作.>

我被困在 DOM 断点 部分(靠近底部).

I'm trying to follow the tutorial here.

我访问了示例站点 他们在谈论.我按下 ctrl+shift+i 并导航到元素"选项卡.在元素选项卡中,我找到了以下 html 部分:

I'm stuck on the section DOM Breakpoints (near the bottom).

I went to the example site they are talking about. I pressed ctrl+shift+i and navigated to "elements" tab. In the elements tab I found the following html section:

现在我一直在寻找上下文菜单:

Now I'm stuck trying to find the context menu:

在#profileCard 元素上调出上下文菜单并选择您想要中断的事件:子树修改、属性修改,删除节点

Bring up a context menu on the #profileCard element and select the events you want to break on: subtree modifications, attributes modifications, and the node removal

这是显示我所在位置的屏幕截图:

Here is a screenshot to show where I am:

推荐答案

要在 Chrome 中设置断点,请调出如上所示的检查器,然后单击顶部的脚本选项.这将允许您查看页面上正在使用的脚本并在该页面上插入断点.以及逐步完成它们和其他有用的调试选项.

To set break points in Chrome bring up the inspector like you have shown above and click on the scripts option at the top. This will allow you to look at the scripts being used on the page and to insert break points on that page. As well as step through them and other useful debugging options.

以上是针对 javascript 的,要中断 dom 元素,请右键单击要中断的元素(在检查器内),它将弹出上下文菜单,允许您中断子树修改和诸如此类的内容

The above is for javascript, to break on dom elements right click on the element (inside of the inspector) that you want to break on and it will bring up the context menu that allows you to break on subtree modifications and stuff like that.

这篇关于如何在 Chrome 中设置 DOM 断点的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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