@@ -5,14 +5,15 @@ Table of contents:
55* [ Notifications about new releases / commits] ( #notifications-about-new-releases--commits )
66* [ Changes in API after CEF updates] ( #changes-in-api-after-cef-updates )
77* [ Differences between Python 2 and Python 3] ( #differences-between-python-2-and-python-3 )
8+ * [ How to enable debug information in examples?] ( #how-to-enable-debug-information-in-examples )
9+ * [ Debugging using various chrome:// protocol uris] ( #debugging-using-various-chrome-protocol-uris )
810* [ A blank window on Mac/Linux] ( #a-blank-window-on-maclinux )
911* [ Location of CEF framework in Mac apps] ( #location-of-cef-framework-in-mac-apps )
1012* [ Flash support] ( #flash-support )
1113* [ Feature X works in Google Chrome, but doesn't work in CEF Python] ( #feature-x-works-in-google-chrome-but-doesnt-work-in-cef-python )
1214* [ How to capture Audio and Video in HTML5?] ( #how-to-capture-audio-and-video-in-html5 )
1315* [ Touch and multi-touch support] ( #touch-and-multi-touch-support )
1416* [ Black or white browser screen] ( #black-or-white-browser-screen )
15- * [ How to enable debug information in examples?] ( #how-to-enable-debug-information-in-examples )
1617* [ Python crashes with "Segmentation fault" - how to debug?] ( #python-crashes-with-segmentation-fault---how-to-debug )
1718* [ Windows XP support] ( #windows-xp-support )
1819* [ Mac 32-bit support] ( #mac-32-bit-support )
@@ -89,6 +90,61 @@ they are all unicode strings. Be aware of this when porting cefpython
8990based apps to Python 3, as it may cause issues.
9091
9192
93+ ## How to enable debug information in examples?
94+
95+ You can pass "--debug" command line flag to any of CEF Python
96+ examples and unit tests. It will also work with your app, as
97+ this feature is enabled in CEF Python's core. When this flag is
98+ passed the following settings will be set:
99+ ``` python
100+ settings = {
101+ " debug" : True ,
102+ " log_severity" : cef.LOGSEVERITY_INFO ,
103+ " log_file" : " debug.log" ,
104+ }
105+ cef.Initialize(settings = settings)
106+ ```
107+
108+ Now you should see debug information displayed in console like this:
109+ ```
110+ [CEF Python] Initialize() called
111+ [CEF Python] CefExecuteProcess(): exitCode = -1
112+ [CEF Python] CefInitialize()
113+ [CEF Python] App_OnBeforeCommandLineProcessing_BrowserProcess()
114+ [CEF Python] Command line string for the browser process: ...
115+ ```
116+
117+
118+ ## Debugging using various chrome:// protocol uris
119+
120+ The ` chrome:// ` protocol uris give you access to various debugging
121+ tools. For example if you encounter GPU issues then after the issue
122+ occured load the ` chrome://gpu ` to see a list of errors.
123+
124+ Here is a list of supported ` chrome:// ` protocol uris as of v55.2:
125+ - chrome://accessibility
126+ - chrome://appcache-internals
127+ - chrome://blob-internals
128+ - chrome://credits
129+ - chrome://gpu
130+ - chrome://histograms
131+ - chrome://indexeddb-internals
132+ - chrome://license
133+ - chrome://media-internals
134+ - chrome://net-export
135+ - chrome://net-internals
136+ - chrome://network-error
137+ - chrome://network-errors
138+ - chrome://resources
139+ - chrome://serviceworker-internals
140+ - chrome://system
141+ - chrome://tracing
142+ - chrome://version
143+ - chrome://view-http-cache
144+ - chrome://webrtc-internals
145+ - chrome://webui-hosts
146+
147+
92148## A blank window on Mac/Linux
93149
94150A blank window might appear when your Python does not support
@@ -214,31 +270,6 @@ appear even after disabling GPU hardware acceleration. This is normal
214270because GPU was disabled so WebGL cannot work.
215271
216272
217- ## How to enable debug information in examples?
218-
219- You can pass "--debug" command line flag to any of CEF Python
220- examples and unit tests. It will also work with your app, as
221- this feature is enabled in CEF Python's core. When this flag is
222- passed the following settings will be set:
223- ``` python
224- settings = {
225- " debug" : True ,
226- " log_severity" : cef.LOGSEVERITY_INFO ,
227- " log_file" : " debug.log" ,
228- }
229- cef.Initialize(settings = settings)
230- ```
231-
232- Now you should see debug information displayed in console like this:
233- ```
234- [CEF Python] Initialize() called
235- [CEF Python] CefExecuteProcess(): exitCode = -1
236- [CEF Python] CefInitialize()
237- [CEF Python] App_OnBeforeCommandLineProcessing_BrowserProcess()
238- [CEF Python] Command line string for the browser process: ...
239- ```
240-
241-
242273## Python crashes with "Segmentation fault" - how to debug?
243274
244275Install gdb:
0 commit comments