Building to enable debugging Chromium


#1

Is there a build mode for Electron that enables me to step through the Chromium code? Even with what I think are full symbols, the Chromium code is opaque and is hampering my efforts at tweaking Electron. There appears to be some Chromium source code downloaded with Electron, but it is not the full source (which I discovered as I grabbed the official Chromium source).

I have tried using the Electron symbol servers, but they don’t seem to offer up everything.

Thanks, in advance.


#2

There appears to be some Chromium source code downloaded with Electron, but it is not the full source

Yes, it’s not all of Chromium but this library: libchromiumcontent.


#3

Ok, with that hint, I started poking around and now see that I can use the scripts inside of libchromiumcontent (lcc) to download the relevant source code, and I can trigger a build of that as well. But doesn’t the Electron build download the shared libraries from AWS, or will a sub-build of lcc cause my new binaries to be used? I see a fork of lcc (not merged) that proposes modifying the build scripts to create a debug build with Windows pdb, which should be exactly what I need, but that was over a year ago and I presume there must be some way to “officially” build lcc with various options.

Right?


#4

As an addendum, I see that (documented under the Linux build instructions) that there is now a globally available --build_libchromiumcontent switch. As I work through the Python code, however, I see that it is limited to building a non-debug static library of the Chrome components.

So really, the crux of my questions are:

  1. What is the easiest way to tweak the build scripts so that --build_libchromiumcontent builds a debug DLL with symbols (PDBs)?
  2. If (1) is not readily doable, can I do a debug build of libchromiumcontent by build inside of vendor/libchromiumcontent and somehow point the Electron bootstrap/build at my debug libraries, using the additional (new) switches of --libcc_source_path, --libcc_shared_library_path, and --libcc_static_library_path?