Chrome开发工具导出元素HTML [英] Chrome Dev Tools export Elements HTML

查看:191
本文介绍了Chrome开发工具导出元素HTML的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

要调试我的铬嵌入应用程序,我正在寻找获取源代码的功能chrome开发人员工具提供的网页代码。我基本上希望将元素标签中显示的HTML树(即实际的HTML DOM)显示为HTML文本。是否存在此功能?我怎么使用它?

To debug my chromium-embedded application I am looking for a function to get the source code of the web page from withing the chrome developer tools. I basically want the HTML tree shown in the 'Elements' tab, the actual HTML DOM, as HTML text. Does this functionality exist? How can I use it?

当我使用CEF时,我只有chrome开发工具可用,而没有完整的浏览器。我不能使用右键单击上下文菜单,因为我想查看当前操作的DOM,而不是原始源。

As I use CEF I do only have the chrome dev tools available and not the full browser. I cannot use the right-click context menu because I want to see the current manipulated DOM and not the original source.

我想将此功能用于调试目的,以便我可以区分两个不同的HTML树。

I want to use this functionality for debugging purpose so that I can diff two different HTML trees.

推荐答案

选择顶部节点,然后选择复制。不过,您必须重新添加Doctype。

Select the top node and choose "Copy". You'll have to re-add the Doctype, though.

或者,您也可以单击以HTML格式编辑并从那里复制。

Alternatively, you could click on "edit as HTML" and copy it from there.

这篇关于Chrome开发工具导出元素HTML的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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