@@ -5,6 +5,7 @@ Table of contents:
5
5
* [ Changes in API after CEF updates] ( #changes-in-api-after-cef-updates )
6
6
* [ Differences between Python 2 and Python 3] ( #differences-between-python-2-and-python-3 )
7
7
* [ 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 )
8
9
* [ Debugging using various chrome:// protocol uris] ( #debugging-using-various-chrome-protocol-uris )
9
10
* [ A blank window on Mac/Linux] ( #a-blank-window-on-maclinux )
10
11
* [ 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:
76
77
```
77
78
78
79
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
+
79
120
## Debugging using various chrome:// protocol uris
80
121
81
122
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:
104
145
- chrome://view-http-cache
105
146
- chrome://webrtc-internals
106
147
- chrome://webui-hosts
107
-
148
+
108
149
109
150
## A blank window on Mac/Linux
110
151
0 commit comments