为提升您的使用体验,本站正在维护,部分功能暂时无法使用。如果本站文章无法解决您的问题,您想要向社区提问的话,请到 Twitter 上的 @FirefoxSupport 或 Reddit 上的 /r/firefox 提问,我们的支持社区将会很快回复您的疑问。

搜索 | 用户支持

防范以用户支持为名的诈骗。我们绝对不会要求您拨打电话或发送短信,及提供任何个人信息。请使用“举报滥用”选项报告涉及违规的行为。

详细了解

When viewing a web page how do i display that web pages source code

  • 6 个回答
  • 8 人有此问题
  • 5 次查看
  • 最后回复者为 Southerner

more options

IE provides in the view menu the option of displaying the source code of the page being viewed, I cannot find this function in firefox

IE provides in the view menu the option of displaying the source code of the page being viewed, I cannot find this function in firefox

所有回复 (6)

more options
  • Firefox > Web Developer > Page Source
  • Tools > Web Developer > Page Source (Ctrl+U)
  • Right-click on a web page to open the context menu and select View Page Source
more options

That would be helpful except that it does not open the page in the external page source editor that I have set in config. It still opens it in the default Firefox page source viewer which is lame and useless for editing!

more options

You can first open the source code in a Firefox tab with the view-source: protocol and then use View Page Source (Ctrl+U) to open the source in the external editor.

more options

That does not work, at least on my installation. It merely opens the source page in a second Firefox source viewer window and not in an external editor window. I have the path to my Notepad++ escaped as suggested elsewhere but it does not get called or opened.

more options

(fixed for Southerner as per: [/questions/939775#answer-406824])

more options

As Cor-el said, it is working now.

that worked. No changes that I made in about:config seemed to make much difference but editing prefs.js directly as you suggested (for 64 bit Windows 7):

user_pref("view_source.editor.path", "C:\\\\Program Files (x86)\\\\Notepad++\\\\Notepad++.exe");

The config file shows the path to Notepad++ as being identical to what I had already entered! That entry is and was: C:\\Program Files (x86)\\Notepad++\\Notepad++.exe

It is ironic that entering it in Prefs.js made it work but putting it in via the about:config page did not.  Of course in prefs.js there are two back slashes for every one shown above.

Oh well, at least now it works.

Thank you.