Toolkit:Password Manager/Debugging

< Toolkit:Password Manager
Revision as of 04:22, 21 May 2014 by Mnoorenberghe (talk | contribs) (Update for @autocomplete=off changes and Browser Console)

The password manager in Firefox includes the ability to log debugging information to the Browser 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 Browser Console from the Tools → Web Developer menu.
  2. Make sure the "JS" logging options are all enabled in the Browser Console.
  3. Load a web page in in the browser. You should see messages in the Browser Console like:
Login Manager (content): onFormPassword for https://www.google.com
Login Manager: Counting logins matching host: https://www.google.com, formSubmitURL:  httpRealm: null

To copy messages, select the text and copy the usual way e.g. choose Copy from the context menu.

Common Problems

Won't auto-fill a saved password

Some sites use autocomplete="off" in their HTML, which directs the password manager not to autofill/autocomplete the login on page load. You can look for this in the page's HTML, or by using the password manager logging. You may still be able to autocomplete the password from the autocomplete dropdown on the username field (if one exists). Here's some example output:

…
PwMgr mozStorage: _findLogins: returning 1 logins
Login Manager (content): found 1 matching logins.
Login Manager (content): form not filled, has autocomplete=off
Login Manager (content): autocomplete=off but form can be filled; notified observers
…

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.
…