Usage of Chromium's lldbinit.py is recommended when debugging with lldb. This is necessary for source-level debugging when strip_absolute_paths_from_debug_symbols
is enabled [this is the default].
To use, add the following to your ~/.lldbinit
# So that lldbinit.py takes precedence. script sys.path[:0] = ['<.../path/to/chromium/src/tools/lldb>'] script import lldbinit
~/.lldbinit
file, don't forget to put the correct path to Chromium source in there.lldb out/Default/chrome
(or out/Debug/chrome
)lldb out/Default/Chromium.app/Contents/MacOS/Chromium
--no-sandbox
flag:out/Default/chrome --no-sandbox
out/Default/Chromium.app/Contents/MacOS/Chromium --no-sandbox
process launch -- --no-sandbox
, you will attach to the main browser process and will not be able to debug tab processes.process attach -p PID
. PID is the process ID of the tab (process) you want to debug.Process PID stopped
and some stack traces.breakpoint set -f inspector_overlay_agent.cc -l 627
.cont
to continue the execution of the process.help
to learn more about different lldb commands.