本文介绍了保存firefox开发人员工具javascript命令历史记录的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用开发人员工具控制台运行JavaScript命令.当前显示的是使用向上箭头键可访问的大约40-50条已执行命令的历史记录.

I use Developer Tools Console to run JavaScript commands. It is currently showing history of about 40-50 executed commands accessible using Up Arrow key.

在历史记录中,它多次显示重复的命令,而我在4-5天前执行的较早的命令也消失了.

In the history it is showing repeated commands multiple times and the earlier commands I executed 4-5 days ago have vanished.

任何想法如何恢复/保存此历史记录或扩展历史记录以保存无限的命令(例如在普通控制台中)?

Any Idea how to recover/save this history OR expand history to save unlimited commands (like in normal console)?

推荐答案

无法(从Firefox 55.0.1开始)指定要保留的历史记录项的数量实际上是无限的.但是,您可以指定一个更大的数字,最大为2147483647.为此,请转到 about:config .然后,将首选项 devtools.webconsole.inputHistoryCount 更改为所需的整数值.默认值为50.

There is no way (as of Firefox 55.0.1) to specify an actually unlimited number of history items to keep. However, you can specify a larger number, up to 2147483647. To do so, go to about:config. Then, change the preference devtools.webconsole.inputHistoryCount to the integer value which you desire. The default is 50.

您可以验证是否无法从源代码.

You can verify that there's no way to specify an unlimited size from the source code.

没有办法恢复旧的,被遗忘的历史记录(请参见上面链接的源代码).它被遗忘了.

There is no way to recover older, forgotten history (see source code linked above). It is forgotten.

我发现保存这样的代码(除了存储在历史记录之外)的唯一方法是将其复制并粘贴到其他位置.您可以制作一个旧式加载项,使保存此历史记录更加容易,但不能使用WebExtension.在简短的搜索中,我没有找到一个已经存在的附加组件.

The only way I have found to save such code (beyond what is stored in the history) is to copy and paste it into some other location. You could make a legacy add-on which made saving this history easier, but not a WebExtension. In a brief search, I did not find an already existing add-on to do so.

您可以在以下位置找到更多常规信息:

You can find more general information at:

这篇关于保存firefox开发人员工具javascript命令历史记录的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-17 09:02