Changes between Version 3 and Version 4 of WebKitGTK/Debugging


Ignore:
Timestamp:
Nov 21, 2013 8:44:07 AM (10 years ago)
Author:
Andres Gomez
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • WebKitGTK/Debugging

    v3 v4  
    1919#!sh
    2020$ Tools/jhbuild/jhbuild-wrapper --gtk run gdb --args WebKitBuild/Debug/Programs/GtkLauncher
     21}}}
     22
     23== Logging support ==
     24
     25Logging and other output/behaviors support is activated by default in a ''Debug'' build only.
     26
     27In addition to having the logging support activated in the compilation, we need also to turn on the proper logging channels when running.
     28
     29These channels are defined in the ''Logging.h'' headers along the code:
     30 * [http://trac.webkit.org/browser/trunk/Source/WebCore/platform/Logging.h Source/WebCore/platform/Logging.h]
     31 * [http://trac.webkit.org/browser/trunk/Source/WebKit2/Platform/Logging.h Source/WebKit2/Platform/Logging.h]
     32
     33For passing the wanted channels to the running process we need to use the ''WEBKIT_DEBUG'' env variable as it is seen in:
     34 * [http://trac.webkit.org/browser/trunk/Source/WebCore/platform/gtk/LoggingGtk.cpp WebCore/platform/gtk/LoggingGtk.cpp]
     35 * [http://trac.webkit.org/browser/trunk/Source/WebKit2/Platform/gtk/LoggingGtk.cpp Source/WebKit2/Platform/gtk/LoggingGtk.cpp]
     36 * Notice also the ''DISABLE_NI_WARNING'' env variable referred there.
     37
     38It is important to export the ''WEBKIT_DEBUG'' env variable so we will want it also to affect the ''WeProcess''.
     39 * This is an example for turning on the logging int he ''Network'' channel. Notice that the channels are case insensitive.
     40{{{
     41#!sh
     42$ export WEBKIT_DEBUG="network"
     43$ Tools/Scripts/run-minibrowser --gtk
     44}}}
     45
     46It is also possible to turn '''on''' the logging and other output/behaviors support in a ''Release'' build by setting the proper C Macros. You may want to check the [http://trac.webkit.org/browser/trunk/Source/WTF/wtf/Assertions.h Source/WTF/wtf/Assertions.h] header.
     47 * This is a ''Release'' build example in which we want to turn on the logging support
     48 {{{
     49#!sh
     50$ export CPPFLAGS="-DLOG_DISABLED=0"
     51$ Tools/Scripts/build-webkit --gtk
    2152}}}
    2253
     
    5889
    5990 * [wiki:WebKitGTK/TrackingMemoryErrors Tracking memory errors in WebKitGTK+]
    60