:memo: Thai: translated accessibility.md
[platform/framework/web/crosswalk-tizen.git] / docs-translations / th-TH / tutorial / devtools-extension.md
1 # DevTools Extension
2
3 Electron supports the [Chrome DevTools Extension][devtools-extension], which can
4 be used to extend the ability of devtools for debugging popular web frameworks.
5
6 ## How to load a DevTools Extension
7
8 This document outlines the process for manually loading an extension.
9 You may also try
10 [electron-devtools-installer](https://github.com/GPMDP/electron-devtools-installer),
11 a third-party tool that downloads extensions directly from the Chrome WebStore.
12
13 To load an extension in Electron, you need to download it in Chrome browser,
14 locate its filesystem path, and then load it by calling the
15 `BrowserWindow.addDevToolsExtension(extension)` API.
16
17 Using the [React Developer Tools][react-devtools] as example:
18
19 1. Install it in Chrome browser.
20 1. Navigate to `chrome://extensions`, and find its extension ID, which is a hash
21    string like `fmkadmapgofadopljbjfkapdkoienihi`.
22 1. Find out filesystem location used by Chrome for storing extensions:
23    * on Windows it is `%LOCALAPPDATA%\Google\Chrome\User Data\Default\Extensions`;
24    * on Linux it could be:
25      * `~/.config/google-chrome/Default/Extensions/`
26      * `~/.config/google-chrome-beta/Default/Extensions/`
27      * `~/.config/google-chrome-canary/Default/Extensions/`
28      * `~/.config/chromium/Default/Extensions/`
29    * on macOS it is `~/Library/Application Support/Google/Chrome/Default/Extensions`.
30 1. Pass the location of the extension to `BrowserWindow.addDevToolsExtension`
31    API, for the React Developer Tools, it is something like:
32    `~/Library/Application Support/Google/Chrome/Default/Extensions/fmkadmapgofadopljbjfkapdkoienihi/0.15.0_0`
33
34 **Note:** The `BrowserWindow.addDevToolsExtension` API cannot be called before the
35 ready event of the app module is emitted.
36
37 The name of the extension is returned by `BrowserWindow.addDevToolsExtension`,
38 and you can pass the name of the extension to the `BrowserWindow.removeDevToolsExtension`
39 API to unload it.
40
41 ## Supported DevTools Extensions
42
43 Electron only supports a limited set of `chrome.*` APIs, so some extensions
44 using unsupported `chrome.*` APIs for chrome extension features may not work.
45 Following Devtools Extensions are tested and guaranteed to work in Electron:
46
47 * [Ember Inspector](https://chrome.google.com/webstore/detail/ember-inspector/bmdblncegkenkacieihfhpjfppoconhi)
48 * [React Developer Tools](https://chrome.google.com/webstore/detail/react-developer-tools/fmkadmapgofadopljbjfkapdkoienihi)
49 * [Backbone Debugger](https://chrome.google.com/webstore/detail/backbone-debugger/bhljhndlimiafopmmhjlgfpnnchjjbhd)
50 * [jQuery Debugger](https://chrome.google.com/webstore/detail/jquery-debugger/dbhhnnnpaeobfddmlalhnehgclcmjimi)
51 * [AngularJS Batarang](https://chrome.google.com/webstore/detail/angularjs-batarang/ighdmehidhipcmcojjgiloacoafjmpfk)
52 * [Vue.js devtools](https://chrome.google.com/webstore/detail/vuejs-devtools/nhdogjmejiglipccpnnnanhbledajbpd)
53 * [Cerebral Debugger](http://www.cerebraljs.com/documentation/the_debugger)
54 * [Redux DevTools Extension](https://chrome.google.com/webstore/detail/redux-devtools/lmhkpmbekcpmknklioeibfkpmmfibljd)
55
56 ### What should I do if a DevTools Extension is not working?
57
58 First please make sure the extension is still being maintained, some extensions
59 can not even work for recent versions of Chrome browser, and we are not able to
60 do anything for them.
61
62 Then file a bug at Electron's issues list, and describe which part of the
63 extension is not working as expected.
64
65 [devtools-extension]: https://developer.chrome.com/extensions/devtools
66 [react-devtools]: https://chrome.google.com/webstore/detail/react-developer-tools/fmkadmapgofadopljbjfkapdkoienihi