[19] 近年の多くの [[Webブラウザー]]には、[[Webページ]]の開発者向けのツールが標準で組み込まれています。

[18] [[HTML Standard]] は[DFN[[RUBYB[開発者コンソール]@en[development console]]]]や[DFN[[RUBYB[開発コンソール]@en[development console]]]]という呼称で[[エラーの報告]]などで言及していますが、
その詳細を規定しているわけではありません。

[36] [CITE[Service Workers]] は単に「console」と呼んでいます。

* 報告

[21] 次の場面で、[[開発者コンソール]]へ[[エラー]]などを報告することができると[[仕様書]]により明示されています。

[FIG(middle list)[
- [[例外の報告]]
- [[イベントハンドラーの現在値を取得]]
- [CODE(HTMLa)@en[[[pattern]]]] [[属性値]]の[[コンパイル]]失敗
- [[受動的]]な[[イベントリスナー]]からの [CODE(DOMm)@en[[[preventDefault]]]]
- [CODE(DOMm)@en[postMessage]] の誤った利用
- [[handle fetch]]
- [CODE[Geolocation]]
]FIG]

[23] 他に次の場面で報告する実装があります。

[FIG(middle list)[
- [[同期モード]]の [[XHR]]
- [[fetch]] 失敗、例えば:
-- [[混合内容][Mixed Content]]制約違反
-- [[同一起源ポリシー]]違反
-- [[CORS]] エラー
-- [[HTTP]] エラー
-- [[TLS]] エラー
-- その他[[ネットワークエラー]]
- [[WebSocket]] のエラー
- [[構文解析誤り]]
]FIG]

[31] 次のものも報告できます。

[FIG(middle list)[
- [[URL構文解析器]]の[[構文違反]]
]FIG]

[34] [[制約群を対話的に検証]]した結果、「スクリプト誤りを報告」
する場合があります。 ([[誤りを報告]]にはリンクされておらず、
詳細な規定もないのですが、[[開発者コンソール]]への報告が意図されていると思われます。)

[41] [[仕様書]]での規定方法は一定していません。

[42] [CITE[Geolocation API Specification]]
は、
「inform the developer that」
と書いています。
[SRC[>>43]]

[REFS[
- [43] [CITE@en[Geolocation API Specification]], [TIME[2019-11-24 18:38:51 +09:00]] <https://w3c.github.io/geolocation-api/#dom-geolocation-getcurrentposition>
]REFS]

* 関連

[SEE[ [[開発モード]] ]]

* 歴史

[1]
[CITE[Safari Developer FAQ]] ([TIME[2006-12-31 11:40:00 +09:00]] 版) <http://developer.apple.com/jp/internet/safari/faq.html#anchor14>

[2] [CITE@en[Console]]
( ([TIME[2011-02-17 00:57:17 +09:00]] 版))
<http://sideshowbarker.github.com/console-spec/>

[3] [[Chrome]] と [[Firefox]] は [CODE(DOMi)@en[[[Console]]]] [[インターフェイスオブジェクト]]が
[CODE(JS)@en[[[window.Console]]]] でアクセスできませんが、
[[WinIE10]] はアクセスできるようです。


[4] [CITE[DeveloperToolsWG/console-object]]
( ([TIME[2014-05-22 04:08:57 +09:00]] 版))
<https://github.com/DeveloperToolsWG/console-object>

[5] [CITE[IRC logs: freenode / #whatwg / 20140902]]
( ([TIME[2014-09-03 02:49:15 +09:00]] 版))
<http://krijnhoetmer.nl/irc-logs/whatwg/20140902#l-633>

[6] [CITE@en-US[Console - Web API Interfaces | MDN]]
( ([TIME[2014-05-28 11:54:03 +09:00]] 版))
<https://developer.mozilla.org/en-US/docs/Web/API/console>

[7] [CITE@en[console-object/api.md at master · DeveloperToolsWG/console-object]]
( ([TIME[2014-09-03 03:11:35 +09:00]] 版))
<https://github.com/DeveloperToolsWG/console-object/blob/master/api.md>

[8] [CITE@en[terinjokes/console-spec]]
( ([TIME[2014-09-19 00:06:52 +09:00]] 版))
<https://github.com/terinjokes/console-spec>

[9] [CITE[IRC logs: freenode / #whatwg / 20140918]]
( ([TIME[2014-09-19 00:10:12 +09:00]] 版))
<http://krijnhoetmer.nl/irc-logs/whatwg/20140918#l-697>

[10] [CITE@en[Console Standard]]
([TIME[2014-10-14 17:43:04 +09:00]] 版)
<http://terinjokes.github.io/console-spec/>

[11] [CITE@en[Console API - FirebugWiki]]
([TIME[2015-10-01 12:03:27 +09:00]] 版)
<http://getfirebug.com/wiki/index.php/Console_API>

[FIG(quote)[
[FIGCAPTION[
[12] [CITE[Command Line API Reference | Web Tools - Google Developers]]
([TIME[2015-10-22 02:51:16 +09:00]] 版)
<https://developers.google.com/web/tools/chrome-devtools/debug/command-line/command-line-reference>
]FIGCAPTION]

> The Command Line API contains a collection of convenience functions for performing common tasks: selecting and inspecting DOM elements, displaying data in readable format, stopping and starting the profiler, and monitoring DOM events.
> Note
> This API is only available from within the console itself. You cannot access the Command Line API from scripts on the page.

]FIG]


[FIG(quote)[
[FIGCAPTION[
[13] [CITE@en[The Console]]
([TIME[2015-10-23 13:35:23 +09:00]] 版)
<https://developer.apple.com/library/safari/documentation/AppleApplications/Conceptual/Safari_Developer_Guide/Console/Console.html#//apple_ref/doc/uid/TP40007874-CH6-SW1>
]FIGCAPTION]

> You can inspect HTML nodes and JavaScript objects in more detail by using the console commands listed in Table 5-1. Type the command-line APIs interactively within the console.
> If your scripts share the same function name as a Command-Line API function, the function in your scripts takes precedence.

]FIG]


[14] [CITE@en-US[The command line interpreter - Firefox Developer Tools | MDN]]
([TIME[2015-10-01 05:31:01 +09:00]] 版)
<https://developer.mozilla.org/en-US/docs/Tools/Web_Console/The_command_line_interpreter>

[15] [CITE@en[Using the Console to view errors and debug (Windows)]]
([TIME[2015-10-23 13:36:25 +09:00]] 版)
<https://msdn.microsoft.com/en-us//library/dn255006%28v=vs.85%29.aspx>

[16] [CITE@en[Console Debugging API (Internet Explorer)]]
([TIME[2015-10-23 13:36:38 +09:00]] 版)
<https://msdn.microsoft.com/en-us/library/hh772173(v=vs.85).aspx>

[FIG(quote)[
[FIGCAPTION[
[17] [CITE@en[Safari 4.0]]
([TIME[2015-11-04 22:47:26 +09:00]] 版)
<https://developer.apple.com/library/safari/releasenotes/General/WhatsNewInSafari/Articles/Safari_4_0.html#//apple_ref/doc/uid/TP40014305-CH4-SW19>
]FIGCAPTION]

> WebKit has some new and changed console methods that improve functionality and compatibility.
> Note: All of the console methods are compatible with Firebug.
> 

]FIG]


[20] [CITE@en[Report errors to developer consoles, not users · whatwg/html@a6d04ea]]
([TIME[2015-12-25 11:47:46 +09:00]] 版)
<https://github.com/whatwg/html/commit/a6d04ea7652f5ad1b61e4ab95de490f51511bffe>

[22] [CITE@en[Encourage logging pattern="" compilation failures · whatwg/html@d2a0cbd]]
([TIME[2016-01-02 11:13:47 +09:00]] 版)
<https://github.com/whatwg/html/commit/d2a0cbdec345ffe5cc803683b30971b5786a5188>

[24] [CITE[''''''[''''''*JavaScript*'''''']'''''' consoleメソッドの使用可否をブラウザごとに調べる - Qiita]]
([TIME[2016-01-27 12:30:01 +09:00]] 版)
<https://qiita.com/cigalecigales/items/44a9b1c72eb0ef9e3968>

[25] [CITE@en[whatwg/console]]
([TIME[2016-02-01 18:40:11 +09:00]] 版)
<https://github.com/whatwg/console>

[26] ([TIME[2016-01-31 06:52:46 +09:00]] 版)
<https://console.spec.whatwg.org/>

[27] [CITE@en[Tweaks for the move to WHATWG · whatwg/console@72187bb]]
([TIME[2016-02-01 18:41:26 +09:00]] 版)
<https://github.com/whatwg/console/commit/72187bb9f021a33a98a3c6af9ebc1fea5d24041a>

[28] [CITE@en[Console Standard]]
([TIME[2016-02-09 08:07:19 +09:00]] 版)
<https://console.spec.whatwg.org/>

[29] [CITE@en[''''''[''''''whatwg'''''']'''''' Opinions on window.console = "foo",  and other oddities of window.console]]
([[Domenic Denicola]] 著, [TIME[2016-02-09 08:25:55 +09:00]] 版)
<https://lists.w3.org/Archives/Public/public-whatwg-archive/2016Feb/0001.html>

[30] [CITE@en[Add EventListenerOptions and passive event listener feature · whatwg/dom@253a21b]]
([TIME[2016-02-14 23:56:30 +09:00]] 版)
<https://github.com/whatwg/dom/commit/253a21b8e78e37447c47983916a7cf39c4f6a3c5>

[FIG(quote)[
[FIGCAPTION[
[32] [CITE@en[Web App Manifest]]
([TIME[2016-03-13 03:38:43 +09:00]] 版)
<https://w3c.github.io/manifest/#dfn-issue-a-developer-warning>
]FIGCAPTION]

> When instructed to issue a developer warning, the user agent may report the conformance violation to the developer in a user-agent-specific manner (e.g., report the problem in an error console), or may ignore the error and do nothing.

]FIG]


[33] [CITE@en[Add ''''''[''''''Replaceable'''''']'''''' to the console attributes on Window/WorkerGlobalScope · whatwg/console@59162cf]]
([TIME[2016-03-22 22:43:54 +09:00]] 版)
<https://github.com/whatwg/console/commit/59162cf8ea366dbbcb586d40f5a369154c688ec5>

[35] [[Facebook]] は、
[FIG(quote)[
>
STOP!
>
これは開発者向けのブラウザ機能です。Facebook機能を有効にするためまたは誰かのアカウントをハッキングするために、ここに何かをコピー・貼り付けするように言われた場合、それは第三者があなたのFacebookアカウントへのアクセスを得るための詐欺・不正行為です。
>
詳細はhttps://www.facebook.com/selfxssをご覧ください。
]FIG]
と表示します。 [TIME[2016-06-10T02:59:09.400Z]]

[37] [CITE@en[Changes to Node - NW.js Documentation]]
([TIME[2017-03-15 15:09:12 +09:00]])
<http://docs.nwjs.io/en/latest/References/Changes%20to%20Node/>

[38] [CITE@en['''['''worklets''']''' Remove console from WorkletGlobalScope.]]
([[bfgeek]]著, [TIME[2017-04-05 03:37:26 +09:00]])
<https://github.com/w3c/css-houdini-drafts/commit/9e96e29ca989050a143faea77b95d3defb7b87cf>

[39] [CITE@en[API Reference - Web Application - Tizen Web Device API Reference - Cordova - Console API | Tizen Developers]]
([TIME[2017-04-13 01:20:57 +09:00]])
<https://developer.tizen.org/development/api-references/web-application?redirect=https://developer.tizen.org/dev-guide/3.0.0/org.tizen.web.apireference/html/device_api/mobile/tizen/cordova/console.html>

[40] [CITE@en[Proposal : Add no-developer-console to CSP · Issue #3841 · whatwg/html]]
([TIME[2018-07-26 22:35:40 +09:00]])
<https://github.com/whatwg/html/issues/3841>