Services/Sync/Snippets: Difference between revisions
Jump to navigation
Jump to search
(Created page with "For want of a better place, here are some handy snippets for investigating Sync issues. === Print out a list of large bookmark records === Change '1000' as appropriate. Comp...") |
No edit summary |
||
| Line 16: | Line 16: | ||
} | } | ||
} | } | ||
=== Get a log from Fennec === | |||
* View about:sync-log. | |||
* Long-tap the log in question. Choose "Save Link". | |||
* Open a mail client. Click Attach. | |||
* Choose "File Manager" as the handler. | |||
* Navigate to "Downloads", pick correct file. | |||
Revision as of 23:51, 17 November 2011
For want of a better place, here are some handy snippets for investigating Sync issues.
Print out a list of large bookmark records
Change '1000' as appropriate.
Components.utils.import("resource://services-sync/engines.js");
Components.utils.import("resource://services-sync/engines/bookmarks.js");
let bme = Engines.get("bookmarks");
let ids = Object.keys(bme._store.getAllIDs());
for each (let id in ids) {
let record = bme._store.createRecord(id, "bookmarks");
let len = record.toString().length;
if (len > 1000) {
console.log("ID: " + id + ", len = " + len + ", " + record.title);
}
}
Get a log from Fennec
- View about:sync-log.
- Long-tap the log in question. Choose "Save Link".
- Open a mail client. Click Attach.
- Choose "File Manager" as the handler.
- Navigate to "Downloads", pick correct file.