DEBUGGING CHROMIUM ON MAC ARM

79 views
Skip to first unread message

Rizzo Alessandro

unread,
Sep 18, 2025, 1:16:32 PM (8 days ago) Sep 18
to Chromium-dev
Hi, i was trying to debug chromium on a mac m4 arm64, i've built chromium with the following args but after trying to debug chromium with visual studio code by using lldb i was not able to break using the gui and when trying to break using lldb from the debug console i was shown the raw assembly. I built chromium with the following arguments:
is_debug = true
is_component_build = false
symbol_level = 2
blink_symbol_level = 2
enable_dsyms = true

Nico Weber

unread,
Sep 18, 2025, 1:53:32 PM (8 days ago) Sep 18
to alessandro...@gmail.com, Chromium-dev

--
--
Chromium Developers mailing list: chromi...@chromium.org
View archives, change email options, or unsubscribe:
http://groups.google.com/a/chromium.org/group/chromium-dev
---
You received this message because you are subscribed to the Google Groups "Chromium-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to chromium-dev...@chromium.org.
To view this discussion visit https://groups.google.com/a/chromium.org/d/msgid/chromium-dev/c4049496-2d15-411d-bb92-929a150fb945n%40chromium.org.

Rizzo Alessandro

unread,
Sep 19, 2025, 11:01:56 AM (7 days ago) Sep 19
to Chromium-dev, Nico Weber, Chromium-dev, alessandro...@gmail.com
hi, i'm rebuilding it with is_component_build = true once it's complete i will try it and update you, i did not follow it previously, thank you for pointing it out

Rizzo Alessandro

unread,
Sep 19, 2025, 11:02:41 AM (7 days ago) Sep 19
to Chromium-dev, Nico Weber, Chromium-dev, alessandro...@gmail.com
hi, i've tested with a basic config and it seems to be working well, I'm starting the debugger from vscode with this basic config and just wanted to ask if there is any trick to make the debugging experience even better (it works great even now). Since we are still in topic, i recently got some troubles using remote indexing, I've set up my clang config at ~/Library/Preferences/clangd/config.yaml and I'm also using a custom .clangd file in /Users/samuele/Downloads/chromium/src/.clangd.
I needed to use this .clangd config paired with the following setting.json file and I'm not able to understand if remote indexing is working or not anymore. (logs at https://pastebin.com/ePvssWTr)

/Users/samuele/Downloads/chromium/src/settings.json
{
"clangd.path": "/Users/samuele/.local/bin/clangd",
"clangd.arguments": [
"--background-index", // should be put to --background-index=false but because sometimes remote doesn't seem to actually find the symbol or smth like that clangd merges the remote and local indexes; Background indexing fills the gaps where the remote returns 0 which seems to return 0 a lot of times.
"--compile-commands-dir=/Users/samuele/Downloads/chromium/src/out/Default",
"--clang-tidy",
"--completion-style=detailed",
"--header-insertion=never",
"--log=verbose"
],
"java.import.gradle.enabled": false,
"java.import.maven.enabled": false
}

~/Library/Preferences/clangd/config.yaml
```If:
  PathMatch: /Users/samuele/Downloads/chromium/src/.*
Index:
  External:
    Server: linux.clangd-index.chromium.org:5900
    MountPoint: /Users/samuele/Downloads/chromium/src/
---
If:
  PathMatch: /Volumes/lexar/chromium/src/.*
Index:
  External:
    Server: linux.clangd-index.chromium.org:5900
    MountPoint: /Volumes/lexar/chromium/src/```

/Users/samuele/Downloads/chromium/src/.clangd
# /Users/samuele/Downloads/chromium/src/.clangd
CompileFlags:
Remove:
- --warning-suppression-mappings=*
- -Xclang
- -add-plugin
- -plugin-arg-*
- -include
- obj/**/precompile*.h-cc

Diagnostics:
UnusedIncludes: None
MissingIncludes: None

Index:
External:
MountPoint: /Users/samuele/Downloads/chromium/src
Background: Build


launch.json config
{
"name": "Debug Chromium",
"type": "lldb",
"request": "launch",
"program": "/Users/samuele/Downloads/chromium/src/out/Default/Chromium.app/Contents/MacOS/Chromium",
"args": [
"--no-sandbox",
"--user-data-dir=/tmp/chrome-debug",
"--disable-extensions"
],
"cwd": "/Users/samuele/Downloads/chromium/src",
"stopOnEntry": false,
"console": "integratedTerminal",
}

Il giorno giovedì 18 settembre 2025 alle 19:53:32 UTC+2 Nico Weber ha scritto:
Reply all
Reply to author
Forward
0 new messages