Skip to content

Commit 3ffa695

Browse files
committed
Update Knowledge-Base.md - remote debugging with Google Chrome instance
1 parent eec0d45 commit 3ffa695

File tree

2 files changed

+43
-2
lines changed

2 files changed

+43
-2
lines changed

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -239,7 +239,7 @@ support old operating systems then choose the v31 release.
239239
OS | Py2 | Py3 | 32bit | 64bit | Requirements
240240
--- | --- | --- | --- | --- | ---
241241
Windows | 2.7 | 3.4 / 3.5 / 3.6 / 3.7 | Yes | Yes | Windows 7+
242-
Linux | 2.7 | 3.4 / 3.5 / 3.6 / 3.7 | Yes | Yes | Debian 8+, Ubuntu 14.04+, Fedora 24+, openSUSE 13.3+
242+
Linux | 2.7 | 3.4 / 3.5 / 3.6 / 3.7 | Yes | Yes | Debian 8+, Ubuntu 14.04+,<br> Fedora 24+, openSUSE 13.3+
243243
Mac | 2.7 | 3.4 / 3.5 / 3.6 / 3.7 | No | Yes | MacOS 10.9+
244244

245245
These platforms are not supported yet:

docs/Knowledge-Base.md

+42-1
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ Table of contents:
55
* [Changes in API after CEF updates](#changes-in-api-after-cef-updates)
66
* [Differences between Python 2 and Python 3](#differences-between-python-2-and-python-3)
77
* [How to enable debug information in examples?](#how-to-enable-debug-information-in-examples)
8+
* [Remote debugging with Google Chrome instance](#remote-debugging-with-google-chrome-instance)
89
* [Debugging using various chrome:// protocol uris](#debugging-using-various-chrome-protocol-uris)
910
* [A blank window on Mac/Linux](#a-blank-window-on-maclinux)
1011
* [Location of CEF framework in Mac apps](#location-of-cef-framework-in-mac-apps)
@@ -76,6 +77,46 @@ Now you should see debug information displayed in console like this:
7677
```
7778

7879

80+
## Remote debugging with Google Chrome instance
81+
82+
Remote debugging is enabled by default and is configurable using
83+
the ApplicationSettings.[remote_debugging_port](../api/ApplicationSettings.md#remote_debugging_port) option.
84+
When launching app you can see in console log the random port that
85+
was generated:
86+
87+
```
88+
DevTools listening on ws://127.0.0.1:63967/devtools/browser/c52ad9ad-bf40-47d1-b2d1-be392d536a2b
89+
```
90+
91+
You can debug remotely in two ways:
92+
93+
1. Debug with CEF devtools. Open the `http://127.0.0.1:port` url
94+
(replace port with e.g. 63967 in our case) in a Google Chrome
95+
browser. You will see a list of CEF browser instances running
96+
which you can debug with DevTools.
97+
This way of debugging has the same sets of features as opening DevTools
98+
popup via `Browser.ShowDevTools` method or using the "Show DevTools"
99+
option from mouse context menu in a CEF app. CEF DevTools has some
100+
limits, not all features of Google Chrome DevTools do work. There
101+
is another way to remotely debug that can workaround these limits,
102+
see the point 2 below.
103+
104+
2. If some features don't work when debugging with CEF devtools you can
105+
use dedicated DevTools for Node in Google Chrome browser. For example
106+
as of CEF v70 the devtools feature "Save as HAR file" doesn't work,
107+
however it works with dedicated DevTools for Node. Follow these steps
108+
to use dedicated DevTools for Node with CEF:
109+
110+
1. In Google Chrome browser open `chrome://inspect` url and click
111+
"Open dedicated DevTools for Node"
112+
2. Add `localhost:1234` connection and close the popup window
113+
3. Set `ApplicationSettings.remote_debugging_port` to `1234` and
114+
run your app
115+
4. Refresh the `chrome://inspect` page in Google Chrome browser
116+
5. You should see a new target on the Remote Target list. Click
117+
"inspect" link for this target.
118+
119+
79120
## Debugging using various chrome:// protocol uris
80121

81122
The `chrome://` protocol uris give you access to various debugging
@@ -104,7 +145,7 @@ Here is a list of supported `chrome://` protocol uris as of v55.2:
104145
- chrome://view-http-cache
105146
- chrome://webrtc-internals
106147
- chrome://webui-hosts
107-
148+
108149

109150
## A blank window on Mac/Linux
110151

0 commit comments

Comments
 (0)