Hans Donitz wrote in message
mailman.346.1460694634...@lists.mozilla.org:
> At some point, I should be able to isolate where in the 1000-line
> user.js the Firefox address-bar is being disabled.
This is a neat approach to debugging long user.js files!
I used the illegal-character technique to find where the Firefox
address-bar search was being disabled!
Plus, I made the debugging test permanent!
Here's what I did just now:
0. I chose to use a unicode characters from Wikipedia that is obvious:
https://en.wikipedia.org/wiki/List_of_Unicode_characters
1. I sprinkled the user.js with this illegal line every 100 lines:
user_pref("00_stop.user.js", β); //illegal beta character stops user.js loading!
2. I typed the following into the URL bar (aka address bar) of Firefox:
?foo
3. If it worked (which it did until I got down to the 350th line),
I then killed Firefox and *commented out* the top-most illegal line
of the user.js that I had inserted, and repeated the process.
Once I got close, I sprinkled the illegal "beta" character every 25
lines. Soon, I ran into this line, which seems to be what was causing
the address bar to no longer act as a search engine:
user_pref("keyword.enabled", false);
I changed that line to:
user_pref("keyword.enabled", true);//false will disable url-bar search
And now the url-bar acts as a search engine again!
Voila!
NOTE: I have all "guessing" by Firefox turned off, so, the address
bar search is actually indistinguishable from the search-bar search
as the search bar never added any value whatsoever to Firefox (IMHO).
In addition, I have Firefox come up minimized to foil fingerprinting,
so, it's actually a pain to change the size of the Firefox window
just to be able to *see* the (normally useless) search bar.
NOTE: I left the test lines in the thousand-line user.js for future use.
Therefore, whenever I run about:config, *instantly* I know if the user.js
loaded to the end, because I would see a value of "10" in the first line
of output of about:config (thanks to Q's suggestion):
user_pref("00_canary.user.js", 100); <=== this is line 100 of user.js
user_pref("00_canary.user.js", 200); <=== this is line 200 of user.js
user_pref("00_canary.user.js", 300); <=== this is line 300 of user.js
... and so on ...
user_pref("00_canary.user.js", 1000); <=== this is the *last* line of user.js!
I also left the commented-out illegal-character lines so that at any time
I need to debug where in the thousand-line file a problem is occurring, I'm
already set up for testing!
//user_pref("00_stop.user.js", β); //illegal beta character stops user.js loading!