I've found this to be useful in my debugging work, and have re-implemented it many times now. Based on this experience, I think it's worth just landing it in the codebase.
Created attachment 357266 [details] proposed patch.
Comment on attachment 357266 [details] proposed patch. Thanks for the review. Landing now.
Comment on attachment 357266 [details] proposed patch. Clearing flags on attachment: 357266 Committed r239188: <https://trac.webkit.org/changeset/239188>
All reviewed patches have been landed. Closing bug.
<rdar://problem/46714996>