為了改善您的使用體驗,本網站正在進行維護,部分功能暫時無法使用。若本站的文件無法解決您的問題,想要向社群發問的話,請到 Twitter 上的 @FirefoxSupport 或 Reddit 上的 /r/firefox 發問,我們的社群成員將很快會回覆您的疑問。

搜尋 Mozilla 技術支援網站

防止技術支援詐騙。我們絕對不會要求您撥打電話或發送簡訊,或是提供個人資訊。請用「回報濫用」功能回報可疑的行為。

了解更多

Log limits

more options

Go to about:config on the address bar, click "Accept the risk and Continue", type "HUD" and you have these: devtools.hud.loglimit devtools.hud.loglimit.console

What are the numbers associated with them mean? is that how MANY logs (as in, how many "individual rectangles" each representing a log), or is that how MANY BYTES they can take up before deleting the older logs in the devtool's console.

Go to about:config on the address bar, click "Accept the risk and Continue", type "HUD" and you have these: devtools.hud.loglimit devtools.hud.loglimit.console What are the numbers associated with them mean? is that how MANY logs (as in, how many "individual rectangles" each representing a log), or is that how MANY BYTES they can take up before deleting the older logs in the devtool's console.

所有回覆 (4)

more options
more options

cor-el said

This loglimit is about the number of lines that are displayed in the web console. See also this test file.

as in, the TOTAL number of lines? Like if a console.log("foo\nbar") would count as 2 lines (however still contained in 1 rectangle box), or is that as in how many rectangle boxes (aforementioned example would take 1)?

more options

I don't know what count as a line but you can test this yourself by setting the pref to a low value and see how many lines you keep. Note that you may have to close and restart Firefox or at least open a new window after modifying the pref.

more options

cor-el said

I don't know what count as a line but you can test this yourself by setting the pref to a low value and see how many lines you keep. Note that you may have to close and restart Firefox or at least open a new window after modifying the pref.

Hmm, okay, I inserted this code with a limit of 20, pasted and entered this watch expression:

console.log("1  Line\nbreak test");
console.log("2  Line\nbreak test");
console.log("3  Line\nbreak test");
console.log("4  Line\nbreak test");
console.log("5  Line\nbreak test");
console.log("6  Line\nbreak test");
console.log("7  Line\nbreak test");
console.log("8  Line\nbreak test");
console.log("9  Line\nbreak test");
console.log("10 Line\nbreak test");
console.log("11 Line\nbreak test");
console.log("12 Line\nbreak test");
console.log("13 Line\nbreak test");
console.log("14 Line\nbreak test");
console.log("15 Line\nbreak test");
console.log("16 Line\nbreak test");
console.log("17 Line\nbreak test");
console.log("18 Line\nbreak test");
console.log("19 Line\nbreak test");
console.log("20 Line\nbreak test");
console.log("21 Line\nbreak test");
console.log("22 Line\nbreak test");
console.log("23 Line\nbreak test");
console.log("24 Line\nbreak test");
console.log("25 Line\nbreak test");
console.log("26 Line\nbreak test");
console.log("27 Line\nbreak test");
console.log("28 Line\nbreak test");
console.log("29 Line\nbreak test");
console.log("30 Line\nbreak test");
console.log("31 Line\nbreak test");
console.log("32 Line\nbreak test");
console.log("33 Line\nbreak test");
console.log("34 Line\nbreak test");
console.log("35 Line\nbreak test");

It looks like each line they meant is each rectangle (each log are separated via horizontal lines, forming this rectangle around the text). As seen on the image, logs with a number are displayed ranging from 16-35, which if you do 35 minus 16, and add 1 to include the first displayed number, equals to 20. Once the limit is reached, the oldest gets removed, and will have the last <LogLimit> logs displayed, much like a queue: https://en.wikipedia.org/wiki/Queue_(abstract_data_type)