WebKit is an engine that uses multiple processes and multiple threads at runtime. There are some very useful generic instructions on how to debug one of its processes on Linux (with focus on the GTK port) in this wiki page. They work pretty well when WebKit is built using the Flatpak SDK and the scripts and gdbserver is installed in the system, but I faced some problems when I wanted to built WebKit with CMake having custom build and installation directories. So in this post, I’m going to describe the easiest way I’ve found so far to debug it when SDK is not being used and a gdbserver is not present in the system. I’ve found this simple solution after having tried a combination of tricks from the WebKit wiki instructions, GDB documentation and a discussion with my colleages at Igalia.