You want to build Chromium with ninja. Trust me. But you appreciate the graphical debugger of Xcode. What to do? The secret is that you don't need to build with Xcode to use the Xcode debugger. Here are some scenarios, in increasing order of difficulty, that you might find yourself in. Yikes, Chromium crashes when I do [insert action]!This is the simplest scenario. The key here is that Xcode allows you to attach to any process, even if you don't have the project for that process open. The key here is to have a project open. So:
But I want to catch Chromium before it crashes!That's a bit tougher, because the Xcode debugger has issues dropping breakpoints on executables it doesn't know about, so tying 'b' in the debugger pane won't work. In this case, you'll need the Xcode project for what you're debugging. To generate them, pass --ide=xcode to gn gen. Then:
But Chromium crashes on launch before I can attach to it!This is the trickiest scenario, because you need to launch Chromium from within Xcode without allowing Xcode to build. I haven't yet figured out how to convince Xcode to do that; Product > Perform Action > Run Without Building always opens a dialog complaining that it hasn't built Chrome. |