Changes between Version 8 and Version 9 of WebKitGTK/Debugging


Ignore:
Timestamp:
Dec 11, 2013 12:16:18 PM (8 years ago)
Author:
berto@igalia.com
Comment:

How to debug the web and network processes in WebKitGTK+

Legend:

Unmodified
Added
Removed
Modified
  • WebKitGTK/Debugging

    v8 v9  
    8686}}}
    8787
     88== Debugging WebKit2 ==
     89
     90If you want to debug the web process, the simplest way is connecting to
     91it using gdb:
     92{{{
     93$ gdb -p <pid of WebKitWebProcess>
     94}}}
     95However that doesn't work in all cases, because the web process might
     96already have crashed when you are trying to connect to it.
     97
     98You can use the '''WEB_PROCESS_CMD_PREFIX''' environment variable for
     99that purpose. If that variable is defined the web process will be run
     100using its value as a prefix.
     101
     102Example:
     103{{{
     104WEB_PROCESS_CMD_PREFIX='/usr/bin/gdbserver localhost:8080' WebKitBuild/Debug/Programs/MiniBrowser
     105}}}
     106and in a different terminal:
     107{{{
     108$ libtool --mode=execute gdb WebKitBuild/Debug/Programs/WebKitWebProcess
     109(gdb) target remote localhost:8080
     110}}}
     111If you want to debug the network process you can use
     112'''NETWORK_PROCESS_CMD_PREFIX''' in a similar way.
     113
     114Note that these variables are only enabled in debug builds. If you
     115still want to use them in release builds you can remove the relevant
     116'''#ifndef NDEBUG''' in '''ProcessLauncherGtk.cpp''',
     117'''ProcessLauncher.h''', '''WebProcessProxyGtk.cpp''' and
     118'''NetworkProcessProxySoup.cpp'''
     119
    88120== Debugging issues ==
    89121