Debugging Chromium/Chrome without building it

1,547 views
Skip to first unread message

Toph

unread,
Oct 13, 2019, 5:15:32 PM10/13/19
to Chromium-discuss
I don't really understand whether chromium-dev is only for people actually contributing to the project or anyone with technical questions about building/debugging/implementation, so I am asking this here...

Some questions about debugging Chromium/Chrome on Windows:
1) Can I debug official Google Chrome stable channel releases with source (at the line level) by using an appropriate debugger configured with the right symbol server and source indexing without actually building it myself?
2) Can I debug the binary Chromium builds from http://www.chromium.org/getting-involved/download-chromium with source (at the line level) by using the symbols zip download that accompanies the binary without building myself?  Do these builds also support source indexing? 
3) Or do I need a "debug build" of these codebases in order to actually debug them?  Are either the aforementioned binaries already "debug builds" ? (I assume Chrome stable is not)
4) Kind of a redundant question: When do I need to download the source myself (or build it myself) vs use source indexing to debug the aforementioned versions of the browser?

Jakob Kummerow

unread,
Oct 14, 2019, 2:33:47 PM10/14/19
to clo...@gmail.com, Chromium-discuss
That link ↑ claims that enabling source server support in Visual Studio allows you to do source-level debugging of Chrome. Have you tried that?

That said, for any C/C++ program (so this is not at all specific to Chrome/Chromium), expect debugging of Release builds to be somewhat confusing and limited due to compiler optimizations. The machine code simply doesn't follow the written C/C++ code line by line due to inlining, reordering, elimination of redundancies, etc. Some variables will show up as "<optimized out>". For proper debugging, you'll want a Debug build -- that's what Debug builds are for, as their name implies ;-)

AFAIK there are no Debug builds available for download. Most of the time, people debug changes they've made, which requires building with those changes locally.

Alex Gough

unread,
Oct 15, 2019, 3:23:29 PM10/15/19
to Chromium-discuss, clo...@gmail.com
You can use symbols and source indexing as described here: https://www.chromium.org/developers/how-tos/debugging-on-windows. Alternatively you can use the -srcpath argument to windbg to a checkout of the source with an appropriate (or close enough) revision (e.g. see https://chromiumdash.appspot.com/branches).

On Monday, October 14, 2019 at 11:33:47 AM UTC-7, Jakob Kummerow wrote:
Reply all
Reply to author
Forward
0 new messages