Bug 1319052 Comment 18 Edit History

Note: The actual edited comment in the bug view page will always show the original commenter’s name and original timestamp.

Here's some advice which could be helpful:

**Start TB Daily with developer tools and address book open**

- consider creating a dedicated profile for testing purposes on Daily (use `thunderbird.exe -p` to start profile manager and create profile, e.g. 'profile.daily')
- TB start link:
"C:\Program Files\DailyXXX\thunderbird.exe" -p profile.daily -no-remote -purgecaches -allow-downgrade -devtools -addressbook
The last two command line arguments will conveniently start devtools and address book every time you open your Daily installation for testing.
- More info on command line switches:
  - http://kb.mozillazine.org/Command_line_arguments_-_Thunderbird
  - https://developer.mozilla.org/en-US/docs/Mozilla/Command_Line_Options

**Use Devtools at runtime to find your starting point in code**

- make sure devtools are running (from menu, or command line)
- split your screen, devtools left, TB right
- fire up the Thunderbird window you want to investigate, e.g.: "Custom AB Properties" dialog
- From devtools toolbar, pick "Inspector" tab
- Devtools, upper right corner, second toolbar button from the right: "Select an iframe as the currently targeted document": Select the window which you want to investigate (by name), e.g.: "Chrome://messenger/content/addressbook/abAddressBookNameDialog.xhtml
- Now that the correct window is selected in devtools, use leftmost button on devtools toolbar: "Pick an element from the page", then hover your target window: red-dotted border indicates selectable elements. E.g. hover dialog's OK button and it'll take you right to the button code in .xhtml file (layout layer) on Inspector tab.
- From layout layer (xhtml), figure out which code gets run from there. In our example here, a bit tricky, but you'll find a link embedded in the <dialog> which has a .js code file with a base name exactly matching the .xhtml layout file of the properties dialog (only extension differs).
Here's some advice which could be helpful:
(mid-air collision with comment 16 and 17, so this comment written before seeing those)

**Start TB Daily with developer tools and address book open**

- consider creating a dedicated profile for testing purposes on Daily (use `thunderbird.exe -p` to start profile manager and create profile, e.g. 'profile.daily')
- TB start link:
"C:\Program Files\DailyXXX\thunderbird.exe" -p profile.daily -no-remote -purgecaches -allow-downgrade -devtools -addressbook
The last two command line arguments will conveniently start devtools and address book every time you open your Daily installation for testing.
- More info on command line switches:
  - http://kb.mozillazine.org/Command_line_arguments_-_Thunderbird
  - https://developer.mozilla.org/en-US/docs/Mozilla/Command_Line_Options

**Use Devtools at runtime to find your starting point in code**

- make sure devtools are running (from menu, or command line)
- split your screen, devtools left, TB right
- fire up the Thunderbird window you want to investigate, e.g.: "Custom AB Properties" dialog
- From devtools toolbar, pick "Inspector" tab
- Devtools, upper right corner, second toolbar button from the right: "Select an iframe as the currently targeted document": Select the window which you want to investigate (by name), e.g.: "Chrome://messenger/content/addressbook/abAddressBookNameDialog.xhtml
- Now that the correct window is selected in devtools, use leftmost button on devtools toolbar: "Pick an element from the page", then hover your target window: red-dotted border indicates selectable elements. E.g. hover dialog's OK button and it'll take you right to the button code in .xhtml file (layout layer) on Inspector tab.
- From layout layer (xhtml), figure out which code gets run from there. In our example here, a bit tricky, but you'll find a link embedded in the <dialog> which has a .js code file with a base name exactly matching the .xhtml layout file of the properties dialog (only extension differs).

Back to Bug 1319052 Comment 18