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

Merged
merged 6 commits into from
May 20, 2025

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:11 PM PT - May 9th, 2025

@190n, your commit 85e96eda687a38796b135e9632ef1461517055ae passed in Build #16417! 🎉


🧪   To try this PR locally:

bunx bun-pr 19263

That installs a local version of the PR into your bun-19263 executable, so you can run:

bun-19263 --bun

// 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?

@190n 190n requested review from Electroid, a team and heimskr and removed request for a team April 28, 2025 19:07
heimskr
heimskr previously approved these changes Apr 30, 2025
@190n 190n requested review from a team and pfgithub and removed request for a team April 30, 2025 22:55
pfgithub
pfgithub previously approved these changes Apr 30, 2025
@190n 190n requested a review from Jarred-Sumner May 2, 2025 19:15
@190n 190n dismissed stale reviews from pfgithub and heimskr via 5168134 May 9, 2025 22:39
@190n 190n requested review from pfgithub, heimskr and a team May 12, 2025 18:28
@Jarred-Sumner Jarred-Sumner merged commit 259bf47 into main May 20, 2025
59 checks passed
@Jarred-Sumner Jarred-Sumner deleted the ben/webkit-sourcemap branch May 20, 2025 23:50
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.

6 participants