在Chrome开发人员工具的“元素"窗口中获取行号? [英] Get line number in Elements window of Chrome Developer Tools?

查看:261
本文介绍了在Chrome开发人员工具的“元素"窗口中获取行号?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在Chrome浏览器中,工具->开发人员工具->元素标签.源代码旁边没有行号.有没有办法打开它们?

In Chrome, Tools -> Developer Tools -> Elements tab. There are no line numbers next to the source code. Is there a way to toggle them on?

推荐答案

不知道它的用处,但您可以右键单击元素"选项卡中的html元素,选择复制为HTML"并粘贴会生成您喜欢的文本编辑器.这将为您提供DOM的行号,因为它在复制时就已存在.

Don't know how useful it will be, but you can right click on the html element in the Elements tab, select "Copy as HTML" and paste the results in your favorite text editor. That will give you line numbers for the DOM as it exists at the point where you copy it.

就像注释中指出的那样,这与源代码行号不符.

Like the comments point out, this will not correspond to source line numbers.

这篇关于在Chrome开发人员工具的“元素"窗口中获取行号?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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