chromium debugging with eclipse

804 views
Skip to first unread message

Lars George

unread,
Jun 12, 2012, 9:38:18 AM6/12/12
to chromi...@chromium.org
Hi there, I am trying to debug the chromium browser from eclipse but it does not want to work...

I am using the newest eclipse for c++ development. I tried to follow all instructions given here: http://code.google.com/p/chromium/wiki/LinuxEclipseDev and here: http://code.google.com/p/chromium/wiki/LinuxDebugging#GDB

The chromium-src is located in my home directory on a local ssd. I start my eclipse with a script, that adds some directories (depot_tools, chromium/src and eclipse) to the PATH variable.

In eclipse I added several break points in for example the HTMLMediaElement.cpp (WebKit/WebCore) and started the debugger with different Arguments and settings. For example:
--disable-seccomp-sandbox --renderer-cmd-prefix='xterm -title renderer -e gdb --eval-command=run --args'

But the break points wont get hit. Are there any other things to consider? Ah I am using the make build: "make all". Eclipse allows me to debug when the "Stop on startup at main" is marked. So the debugger seems to be connected correctly right?

Thanks for any help you can offer :)


Best regards
Lars

Andrey Khalyavin

unread,
Jun 12, 2012, 3:56:13 PM6/12/12
to chromi...@chromium.org
How would gdb know about breakpoints you set up in eclipse? gdb is launched with gdb --eval-command=run --args renderer_executable_and_flag and doesn't know anything besides that. If you launch chrome from eclipse, your breakpoints will be set only in browser process.

One way to debug renderer in eclipse, is to create attach debug configuration. Set project field to chrome project in your workspace. Then your eclipse breakpoints will be set once you launch that debug configuration and attach to renderer process.

I don't know how to debug renderer from renderer startup in eclipse. I am using raw gdb in this case.

-- Andrey Khalyavin 

Lars George

unread,
Jun 13, 2012, 6:25:36 AM6/13/12
to chromi...@chromium.org
Hmpf... it was that simple:

--single-process

Just using this as argument for the debugging startup in eclipse did the trick. Thanks for reminding me that it is just a process problem to handover the breakpoints.
I already tried that argument, but had several other options set, so eclipse crashed during debug start. So I thought that might not be a good idea... Well now it works just fine.

Thanks
Lars

Pankaj Goyal

unread,
Aug 24, 2015, 6:31:29 AM8/24/15
to Chromium-dev
I found this really helpful post regarding setting up build and debug environment in eclipse.

Josh Karlin

unread,
Aug 26, 2015, 7:20:31 AM8/26/15
to pankajg...@gmail.com, Chromium-dev
Try using --single-process for your flags.

--
--
Chromium Developers mailing list: chromi...@chromium.org
View archives, change email options, or unsubscribe:
http://groups.google.com/a/chromium.org/group/chromium-dev

Reply all
Reply to author
Forward
0 new messages