Toolkit:Password Manager/Debugging: Difference between revisions

From MozillaWiki
Jump to navigation Jump to search
(Browser Console and a pref now true)
Line 5: Line 5:
# Enter "about:config" in the URL bar.
# Enter "about:config" in the URL bar.
# You may see a warning screen, cautioning you about changing advanced preferences. Click the button to ignore the warning.
# You may see a warning screen, cautioning you about changing advanced preferences. Click the button to ignore the warning.
# Find the <code>signon.debug</code> and <code>javascript.options.showInConsole</code> settings, and set them to <code>true</code>. You can enter the name in the "Filter" box at the top of the page to help find them. To change the value of a setting, right-click on the line and select "Toggle" or just double-click the line.
# Find the <code>signon.debug</code> and <code>javascript.options.showInConsole</code> settings, and set them to <code>true</code> (the latter may already be <code>true</code>). You can enter the name in the "Filter" box at the top of the page to help find them. To change the value of a setting, right-click on the line and select "Toggle" or just double-click the line.
# Restart the browser. Some logging is only enabled after the restart.
# Restart the browser. Some logging is only enabled after the restart.


= View the Logging =
= View the Logging =
# To view the logging, open the Error Console from the Tools menu.
# To view the logging, open the Error Console from the Tools menu (in Nightly after May 2013, Browser Console from the Tools → Web Developer menu).
# Click either the "All" or "Messages" icons at the top of the window.
# Click either the "All" or "Messages" icons at the top of the window.
# Load a web page in in the browser. You should see messages in the Error Console like:
# Load a web page in in the browser. You should see messages in the Error Console like:

Revision as of 12:49, 21 August 2013

The password manager in Firefox 3 includes the ability to log debugging information to the Error Console, which can be enabled to help diagnose problems. This logging is off by default. Passwords are not shown in the output.

Enable Debug Logging

  1. Enter "about:config" in the URL bar.
  2. You may see a warning screen, cautioning you about changing advanced preferences. Click the button to ignore the warning.
  3. Find the signon.debug and javascript.options.showInConsole settings, and set them to true (the latter may already be true). You can enter the name in the "Filter" box at the top of the page to help find them. To change the value of a setting, right-click on the line and select "Toggle" or just double-click the line.
  4. Restart the browser. Some logging is only enabled after the restart.

View the Logging

  1. To view the logging, open the Error Console from the Tools menu (in Nightly after May 2013, Browser Console from the Tools → Web Developer menu).
  2. Click either the "All" or "Messages" icons at the top of the window.
  3. Load a web page in in the browser. You should see messages in the Error Console like:
Login Manager: onStateChange accepted: req = http://www.google.com, flags = 196612
Login Manager: onStateChange: adding dom listeners
Login Manager: domEventListener: got event DOMContentLoaded
Login Manager: Counting logins matching host: http://www.google.com, formSubmitURL: , httpRealm: null

To copy a message, right-click on it and select Copy.

Common Problems

Won't prompt to save a password

Some sites use autocomplete="off" in their HTML, which directs the password manager not to save the login. You can look for this in the page's HTML, or by using the password manager logging. Here's some example output from signing into Yahoo Mail:

...
Login Manager: observer notified for form submission.
Login Manager: Checking if logins to https://login.yahoo.com can be saved.
Login Manager: (form submission ignored -- autocomplete=off found)
...

HTTP Authentication popup not filled in

This is often due to the HTTP "Realm" being different from the stored login. The values the password manager is checking can be seen in the logging. Here's some example output from a successful sign in:

...
Pwmgr Prompter: ===== promptAuth called =====
Login Manager: Searching for logins matching host: https://intranet.mozilla.org, formSubmitURL: null, httpRealm: Mozilla Corporation - LDAP Login
Login Manager: Checking if logins to https://intranet.mozilla.org can be saved.
Pwmgr Prompter: Login unchanged, no further action needed.
...