Save firefox developer tools javascript command history

爱⌒轻易说出口 提交于 2021-01-28 07:15:32

问题


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.

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)?


回答1:


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.

Any Idea how to recover/save this history

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

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:

  • The command line interpreter
  • Web Console
  • Browser Console


来源:https://stackoverflow.com/questions/45689706/save-firefox-developer-tools-javascript-command-history

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!