Skip to content

Add sourceMap to launch.json so lldb can find WebKit code #19263

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

190n
Copy link
Collaborator

@190n 190n commented Apr 24, 2025

What does this PR do?

Makes it easier to see WebKit source code in the debugger. For this to work you will need vendor/WebKit to exist and be checked out at the right commit. I added bun sync-webkit-source to make this easier.

How did you verify your code works?

Ran a debugger on macOS and Linux with a breakpoint in Zig::GlobalObject::visitChildrenImpl. With this change you can now pull up source for the WebKit functions that call that method:

image

@robobun
Copy link

robobun commented Apr 24, 2025

Updated 5:15 PM PT - Apr 24th, 2025

@190n, your commit e97e50c has 1 failures in Build #15539:


🧪   try this PR locally:

bunx bun-pr 19263

// Don't pause when the GC runs while the debugger is open.
"sourceMap": {
// macOS
"/Users/runner/work/_temp/webkit-release/vendor/WebKit": "${workspaceFolder}/vendor/WebKit",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why are these needed? Feels like we're not passing the right flags to the WebKit build to make sources relative?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good point, I'll try some things in the WebKit repo. Looks like -fdebug-prefix-map may be it.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think for now this is still worth merging, though?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants