firefox-devel.rst
author Oleksandr Gavenko <gavenkoa@gmail.com>
Mon, 22 Feb 2016 12:41:52 +0200
changeset 1903 901e7394849f
parent 1717 79628df58b2d
child 1905 fba288d59662
permissions -rw-r--r--
Decrease intent to increase space usage on mobile.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
1391
741a44fc9992 Remove duplicate text.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
     1
.. -*- coding: utf-8; -*-
741a44fc9992 Remove duplicate text.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
     2
.. include:: HEADER.rst
741a44fc9992 Remove duplicate text.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
     3
741a44fc9992 Remove duplicate text.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
     4
==========================
741a44fc9992 Remove duplicate text.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
     5
 Develop with/of Firefox.
741a44fc9992 Remove duplicate text.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
     6
==========================
741a44fc9992 Remove duplicate text.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
     7
.. contents::
741a44fc9992 Remove duplicate text.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
     8
1392
a8c75efa691e Fix header title.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1391
diff changeset
     9
Useful Firefox add-ons for developers.
a8c75efa691e Fix header title.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1391
diff changeset
    10
======================================
1391
741a44fc9992 Remove duplicate text.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
    11
1404
20068801663f Plug-ins for Web-development.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1393
diff changeset
    12
  https://addons.mozilla.org/en-US/firefox/collections/mozilla/webdeveloper/
20068801663f Plug-ins for Web-development.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1393
diff changeset
    13
                Plug-ins for Web-development.
20068801663f Plug-ins for Web-development.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1393
diff changeset
    14
1391
741a44fc9992 Remove duplicate text.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
    15
Firebug.
741a44fc9992 Remove duplicate text.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
    16
--------
741a44fc9992 Remove duplicate text.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
    17
741a44fc9992 Remove duplicate text.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
    18
Firebug integrates with Firefox to put a wealth of development tools at your fingertips
741a44fc9992 Remove duplicate text.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
    19
while you browse. You can edit, debug, and monitor CSS, HTML, and JavaScript live in any
741a44fc9992 Remove duplicate text.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
    20
web page.
741a44fc9992 Remove duplicate text.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
    21
741a44fc9992 Remove duplicate text.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
    22
  http://getfirebug.com
741a44fc9992 Remove duplicate text.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
    23
                home page
741a44fc9992 Remove duplicate text.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
    24
  https://addons.mozilla.org/firefox/addon/1843
741a44fc9992 Remove duplicate text.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
    25
                download page
741a44fc9992 Remove duplicate text.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
    26
741a44fc9992 Remove duplicate text.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
    27
Live HTTP Headers.
741a44fc9992 Remove duplicate text.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
    28
------------------
741a44fc9992 Remove duplicate text.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
    29
741a44fc9992 Remove duplicate text.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
    30
 * First by adding a 'Headers' tab in 'View Page Info' of a web page.
741a44fc9992 Remove duplicate text.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
    31
 * Second by adding a tool in the 'Tools->Web Development' menu to be able to display http
741a44fc9992 Remove duplicate text.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
    32
   headers in real time (while pages are being downloaded from the Internet.
741a44fc9992 Remove duplicate text.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
    33
 * Third by letting you edit request headers and replay an URL (beta). Look for the Replay
741a44fc9992 Remove duplicate text.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
    34
   button in the live window!
741a44fc9992 Remove duplicate text.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
    35
741a44fc9992 Remove duplicate text.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
    36
This project may be of some help for the following:
741a44fc9992 Remove duplicate text.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
    37
741a44fc9992 Remove duplicate text.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
    38
 * Help debugging web application.
741a44fc9992 Remove duplicate text.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
    39
 * See which kind of web server the remote site is using.
741a44fc9992 Remove duplicate text.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
    40
 * See the cookies sent by remote site.
741a44fc9992 Remove duplicate text.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
    41
741a44fc9992 Remove duplicate text.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
    42
Alternatively you can use fiddler2 (only Windows as it written in .NET)
741a44fc9992 Remove duplicate text.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
    43
741a44fc9992 Remove duplicate text.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
    44
  http://livehttpheaders.mozdev.org/
741a44fc9992 Remove duplicate text.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
    45
                home page
741a44fc9992 Remove duplicate text.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
    46
  https://addons.mozilla.org/en-US/firefox/addon/3829/
741a44fc9992 Remove duplicate text.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
    47
                download page
741a44fc9992 Remove duplicate text.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
    48
  http://www.fiddler2.com/fiddler2/
741a44fc9992 Remove duplicate text.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
    49
                Web Debugging Proxy
741a44fc9992 Remove duplicate text.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
    50
1514
81d7dd711a43 Wappalyzer.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1407
diff changeset
    51
Wappalyzer.
81d7dd711a43 Wappalyzer.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1407
diff changeset
    52
-----------
81d7dd711a43 Wappalyzer.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1407
diff changeset
    53
81d7dd711a43 Wappalyzer.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1407
diff changeset
    54
Reverse which libraries and frameworks used by page.
81d7dd711a43 Wappalyzer.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1407
diff changeset
    55
81d7dd711a43 Wappalyzer.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1407
diff changeset
    56
  https://addons.mozilla.org/en-US/firefox/addon/wappalyzer/
81d7dd711a43 Wappalyzer.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1407
diff changeset
    57
                download page
81d7dd711a43 Wappalyzer.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1407
diff changeset
    58
1391
741a44fc9992 Remove duplicate text.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
    59
Tamper Data.
741a44fc9992 Remove duplicate text.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
    60
------------
741a44fc9992 Remove duplicate text.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
    61
741a44fc9992 Remove duplicate text.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
    62
 * Use tamperdata to view and modify HTTP/HTTPS headers and post parameters.
741a44fc9992 Remove duplicate text.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
    63
 * Trace and time http response/requests.
741a44fc9992 Remove duplicate text.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
    64
 * Security test web applications by modifying POST parameters.
741a44fc9992 Remove duplicate text.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
    65
741a44fc9992 Remove duplicate text.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
    66
Based on code and incompotable with "Live HTTP Headers" extensions.
741a44fc9992 Remove duplicate text.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
    67
741a44fc9992 Remove duplicate text.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
    68
  http://tamperdata.mozdev.org/index.html
741a44fc9992 Remove duplicate text.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
    69
                home page
741a44fc9992 Remove duplicate text.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
    70
  https://addons.mozilla.org/en-US/firefox/addon/966/
741a44fc9992 Remove duplicate text.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
    71
                download page
741a44fc9992 Remove duplicate text.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
    72
  http://jimbojw.com/wiki/index.php?title=Tamper_Data
741a44fc9992 Remove duplicate text.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
    73
                Tamper Data tutorial.
741a44fc9992 Remove duplicate text.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
    74
741a44fc9992 Remove duplicate text.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
    75
Extension security.
741a44fc9992 Remove duplicate text.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
    76
===================
741a44fc9992 Remove duplicate text.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
    77
741a44fc9992 Remove duplicate text.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
    78
 * https://developer.mozilla.org/en/Security_best_practices_in_extensions
741a44fc9992 Remove duplicate text.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
    79
741a44fc9992 Remove duplicate text.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
    80
Debugging in Firefox.
741a44fc9992 Remove duplicate text.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
    81
=====================
741a44fc9992 Remove duplicate text.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
    82
741a44fc9992 Remove duplicate text.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
    83
For JavaScript::
741a44fc9992 Remove duplicate text.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
    84
741a44fc9992 Remove duplicate text.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
    85
  // Enables strict JavaScript warnings in the Error Console.
741a44fc9992 Remove duplicate text.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
    86
  user_pref("javascript.options.strict", true);
741a44fc9992 Remove duplicate text.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
    87
  // Logs errors in chrome files to the Error Console. Enable Components.utils.reportError().
741a44fc9992 Remove duplicate text.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
    88
  user_pref("javascript.options.showInConsole", true);
741a44fc9992 Remove duplicate text.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
    89
  // Disables the XUL cache so that changes to windows and dialogs do not require a restart.
741a44fc9992 Remove duplicate text.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
    90
  user_pref("nglayout.debug.disable_xul_cache", true);
741a44fc9992 Remove duplicate text.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
    91
  // Enables the use of the dump() statement to print to the standard console.
741a44fc9992 Remove duplicate text.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
    92
  user_pref("browser.dom.window.dump.enabled", true);
741a44fc9992 Remove duplicate text.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
    93
  // This enables to run JavaScript code snippets in the chrome context of the Scratchpad from the Tools menu.
741a44fc9992 Remove duplicate text.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
    94
  user_pref("devtools.chrome.enabled", true);
741a44fc9992 Remove duplicate text.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
    95
  // This will send more detailed information about installation and update problems to the Error Console.
741a44fc9992 Remove duplicate text.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
    96
  user_pref("extensions.logging.enabled", true);
741a44fc9992 Remove duplicate text.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
    97
  user_pref("dom.report_all_js_exceptions", true);
1516
23ce5096b67f Some more development settings.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1514
diff changeset
    98
  // This adds a "Browser Debugger" entry to the "Web Developer" submenu of the "Tools" menu.
23ce5096b67f Some more development settings.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1514
diff changeset
    99
  // The Browser Debugger can be used to debug the JavaScript code of extensions.
23ce5096b67f Some more development settings.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1514
diff changeset
   100
  user_pref("devtools.debugger.remote-enabled", true);
23ce5096b67f Some more development settings.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1514
diff changeset
   101
  // Detect deprecated code use.
23ce5096b67f Some more development settings.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1514
diff changeset
   102
  user_pref("devtools.errorconsole.deprecation_warnings", true);
1391
741a44fc9992 Remove duplicate text.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
   103
1717
79628df58b2d devtool options.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1538
diff changeset
   104
Examine ``devtool`` options in ``about:config`` with prefix ``devtools.``::
79628df58b2d devtool options.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1538
diff changeset
   105
79628df58b2d devtool options.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1538
diff changeset
   106
  user_pref("devtools.debugger.enabled", true);
79628df58b2d devtool options.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1538
diff changeset
   107
  user_pref("devtools.debugger.pause-on-exceptions", true);
79628df58b2d devtool options.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1538
diff changeset
   108
  user_pref("devtools.debugger.auto-pretty-print", true);
79628df58b2d devtool options.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1538
diff changeset
   109
79628df58b2d devtool options.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1538
diff changeset
   110
  user_pref("devtools.debugger.chrome-debugging-host", "localhost");
79628df58b2d devtool options.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1538
diff changeset
   111
  user_pref("devtools.debugger.chrome-debugging-port", 6080);
79628df58b2d devtool options.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1538
diff changeset
   112
  user_pref("devtools.debugger.ignore-caught-exceptions", true);
79628df58b2d devtool options.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1538
diff changeset
   113
  user_pref("devtools.debugger.remote-enabled, true);
79628df58b2d devtool options.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1538
diff changeset
   114
  user_pref("devtools.debugger.remote-host", "localhost");
79628df58b2d devtool options.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1538
diff changeset
   115
  user_pref("devtools.debugger.remote-port", 6000);
79628df58b2d devtool options.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1538
diff changeset
   116
1391
741a44fc9992 Remove duplicate text.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
   117
See:
741a44fc9992 Remove duplicate text.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
   118
741a44fc9992 Remove duplicate text.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
   119
  https://developer.mozilla.org/en/Setting_up_extension_development_environment
741a44fc9992 Remove duplicate text.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
   120
                setting up profile, options and about developer plugin
741a44fc9992 Remove duplicate text.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
   121
741a44fc9992 Remove duplicate text.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
   122
Debugging JavaScript with Web Console.
741a44fc9992 Remove duplicate text.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
   123
--------------------------------------
1405
c761842c6d90 Debugging JavaScript with Web Console.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1393
diff changeset
   124
c761842c6d90 Debugging JavaScript with Web Console.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1393
diff changeset
   125
Instead of "Error Console" (press Ctrl+Shift+J) use "Web Console" (press
c761842c6d90 Debugging JavaScript with Web Console.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1393
diff changeset
   126
Ctrl+Shift+K) in Firefox >=4.0::
1391
741a44fc9992 Remove duplicate text.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
   127
1517
16607af623bc About "new Error().stack" and console.log("%o").
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1516
diff changeset
   128
  console.log("str");
16607af623bc About "new Error().stack" and console.log("%o").
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1516
diff changeset
   129
  console.info("str is %s", "str");
16607af623bc About "new Error().stack" and console.log("%o").
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1516
diff changeset
   130
  console.warn("this is %o", this);
16607af623bc About "new Error().stack" and console.log("%o").
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1516
diff changeset
   131
  console.error("int: %i, float: %f, string: %s, object: %o", 2, .333, "str", this);
16607af623bc About "new Error().stack" and console.log("%o").
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1516
diff changeset
   132
16607af623bc About "new Error().stack" and console.log("%o").
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1516
diff changeset
   133
To see stack-trace use::
16607af623bc About "new Error().stack" and console.log("%o").
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1516
diff changeset
   134
1522
50ff620600c9 console.trace
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1517
diff changeset
   135
  console.trace();
1517
16607af623bc About "new Error().stack" and console.log("%o").
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1516
diff changeset
   136
  console.log(new Error().stack);
1391
741a44fc9992 Remove duplicate text.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
   137
741a44fc9992 Remove duplicate text.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
   138
See:
741a44fc9992 Remove duplicate text.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
   139
1522
50ff620600c9 console.trace
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1517
diff changeset
   140
 * https://developer.mozilla.org/en-US/docs/Web/API/console
1393
01dffbaa35d5 Add links.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1392
diff changeset
   141
 * https://developer.mozilla.org/en/Using_the_Web_Console
01dffbaa35d5 Add links.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1392
diff changeset
   142
 * https://developer.mozilla.org/en-US/docs/Tools/Web_Console
1391
741a44fc9992 Remove duplicate text.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
   143
741a44fc9992 Remove duplicate text.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
   144
Debugging JavaScript with Firebug.
741a44fc9992 Remove duplicate text.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
   145
----------------------------------
741a44fc9992 Remove duplicate text.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
   146
741a44fc9992 Remove duplicate text.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
   147
With Firebug you can use 'console.log(obj)' for logging. Also output can be grouped with
741a44fc9992 Remove duplicate text.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
   148
console.group("name") to start a new indentation block, and then console.groupEnd().
741a44fc9992 Remove duplicate text.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
   149
741a44fc9992 Remove duplicate text.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
   150
Same but with different coloring do 'console.debug', 'console.info', 'console.warn', and
741a44fc9992 Remove duplicate text.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
   151
'console.error' functions.
741a44fc9992 Remove duplicate text.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
   152
741a44fc9992 Remove duplicate text.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
   153
  http://getfirebug.com/logging
741a44fc9992 Remove duplicate text.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
   154
                logging
741a44fc9992 Remove duplicate text.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
   155
  http://getfirebug.com/wiki/index.php/Console_API
741a44fc9992 Remove duplicate text.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
   156
                Console API
1393
01dffbaa35d5 Add links.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1392
diff changeset
   157
  http://getfirebug.com/wiki/index.php/Command_Line
01dffbaa35d5 Add links.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1392
diff changeset
   158
                Command Line
01dffbaa35d5 Add links.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1392
diff changeset
   159
  http://getfirebug.com/wiki/index.php/Console_Panel
01dffbaa35d5 Add links.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1392
diff changeset
   160
                Console Panel
1391
741a44fc9992 Remove duplicate text.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
   161
741a44fc9992 Remove duplicate text.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
   162
dump().
741a44fc9992 Remove duplicate text.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
   163
-------
741a44fc9992 Remove duplicate text.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
   164
741a44fc9992 Remove duplicate text.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
   165
Set in ``about:config`` ``browser.dom.window.dump.enabled`` to ``true``.
741a44fc9992 Remove duplicate text.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
   166
741a44fc9992 Remove duplicate text.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
   167
All messages go to native console. On Windows this require ``-console`` option
741a44fc9992 Remove duplicate text.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
   168
for ``firefox.exe``.
741a44fc9992 Remove duplicate text.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
   169
741a44fc9992 Remove duplicate text.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
   170
  https://developer.mozilla.org/en/DOM/window.dump
741a44fc9992 Remove duplicate text.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
   171
741a44fc9992 Remove duplicate text.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
   172
Components.utils.reportError.
741a44fc9992 Remove duplicate text.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
   173
-----------------------------
741a44fc9992 Remove duplicate text.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
   174
741a44fc9992 Remove duplicate text.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
   175
Write error msg to Error console (not in Web Console)::
741a44fc9992 Remove duplicate text.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
   176
741a44fc9992 Remove duplicate text.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
   177
  Components.utils.reportError("msg");
741a44fc9992 Remove duplicate text.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
   178
  // Show the error console.
741a44fc9992 Remove duplicate text.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
   179
  toJavaScriptConsole();
741a44fc9992 Remove duplicate text.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
   180
741a44fc9992 Remove duplicate text.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
   181
Firefox 3.x require set preference 'javascript.options.showInConsole' to 'true'
741a44fc9992 Remove duplicate text.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
   182
which is default value fro Firefox 4.x.
741a44fc9992 Remove duplicate text.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
   183
741a44fc9992 Remove duplicate text.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
   184
 * https://developer.mozilla.org/en/Components.utils.reportError
741a44fc9992 Remove duplicate text.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
   185
741a44fc9992 Remove duplicate text.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
   186
Build Firefox from sources.
741a44fc9992 Remove duplicate text.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
   187
===========================
741a44fc9992 Remove duplicate text.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
   188
741a44fc9992 Remove duplicate text.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
   189
  https://developer.mozilla.org/en/Build_Documentation
741a44fc9992 Remove duplicate text.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
   190
                Build Instructions
741a44fc9992 Remove duplicate text.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
   191
  https://developer.mozilla.org/en/Mozilla_Source_Code_%28Mercurial%29
741a44fc9992 Remove duplicate text.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
   192
                Getting Mozilla Source Code Using Mercurial
741a44fc9992 Remove duplicate text.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
   193
741a44fc9992 Remove duplicate text.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
   194
Native Firefox debugging.
741a44fc9992 Remove duplicate text.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
   195
=========================
741a44fc9992 Remove duplicate text.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
   196
741a44fc9992 Remove duplicate text.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
   197
 * https://developer.mozilla.org/en/how_to_get_a_stacktrace_with_windbg
741a44fc9992 Remove duplicate text.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
   198
741a44fc9992 Remove duplicate text.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
   199
Adding symbols from Symbol Server.
741a44fc9992 Remove duplicate text.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
   200
----------------------------------
741a44fc9992 Remove duplicate text.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
   201
741a44fc9992 Remove duplicate text.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
   202
Execute in WinDbg::
741a44fc9992 Remove duplicate text.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
   203
741a44fc9992 Remove duplicate text.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
   204
  .sympath SRV*c:\symcache\*http://msdl.microsoft.com/download/symbols;SRV*c:\symcache\*http://symbols.mozilla.org/firefox
741a44fc9992 Remove duplicate text.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
   205
741a44fc9992 Remove duplicate text.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
   206
or Ctrl+S and add::
741a44fc9992 Remove duplicate text.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
   207
741a44fc9992 Remove duplicate text.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
   208
  SRV*c:\symcache\*http://msdl.microsoft.com/download/symbols;SRV*c:\symcache\*http://symbols.mozilla.org/firefox
741a44fc9992 Remove duplicate text.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
   209
741a44fc9992 Remove duplicate text.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
   210
See:
741a44fc9992 Remove duplicate text.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
   211
741a44fc9992 Remove duplicate text.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
   212
  https://developer.mozilla.org/en/Using_the_Mozilla_symbol_server