Skip to content

Track Stack Trace Frames Succeed / Fail to Resolve URL#191

Merged
vzaidman merged 4 commits into
mainfrom
track-unresolved-urls-in-stack-trace-frames
Jul 14, 2025
Merged

Track Stack Trace Frames Succeed / Fail to Resolve URL#191
vzaidman merged 4 commits into
mainfrom
track-unresolved-urls-in-stack-trace-frames

Conversation

@vzaidman
Copy link
Copy Markdown

@vzaidman vzaidman commented Jul 9, 2025

Corresponding PR: D77997371

Context

When a URL for stack trace frames is being resolved for the console UI representation of it:

Success

If a known bundle URL is matched for the frame, it is resolved to link to that URL in the sources panel.

  1. Temporarily, before the source maps are resolved, it links to the original bundle URL:
Screenshot 2025-07-09 at 10 04 21
  1. After the source map is ready, it links to the source file based on the source map:
Screenshot 2025-07-09 at 10 04 29

Failure

If the url is unknown, we fallback to just hyperlinking to that unknown url.
Screenshot 2025-07-09 at 10 05 07

Summary

This PR will track for each stack trace if it was managed to resolve all stack trace frames or did it have a set of URLs that were failed to be resolved.

Technical Context

While there are cleaner ways that than using querySelectorAll to achieve this. None of them were more convenient in terms of branching from CDT.

The problem is that the whole process of linkifying frames in the console UI is a "fire and forget" process which means it does not return any results to the initiator at the moment.

When I tried to return any results I found myself changing too many functions in too many files which is bad for a branch that we need to keep up to date with CDT.

Test plan

D77997371

  • This change maintains backwards compatibility with previous Local Storage data (if modifying settings, experiments, or other persisted client state).

Upstreaming plan

  • This commit should be sent as a patch to the upstream devtools-frontend repo. I've reviewed the contribution guide.
  • This commit is React Native-specific and cannot be upstreamed.

Copy link
Copy Markdown

@hoxyq hoxyq left a comment

Choose a reason for hiding this comment

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

  1. Could you try using data attributes for querying DOM element?
  2. Can you double-check if this records an event if user console.log's a link, like http://example.com?

@vzaidman vzaidman force-pushed the track-unresolved-urls-in-stack-trace-frames branch from 4f52f5a to 632fb1d Compare July 11, 2025 09:52
@vzaidman
Copy link
Copy Markdown
Author

  1. Could you try using data attributes for querying DOM element?
  2. Can you double-check if this records an event if user console.log's a link, like http://example.com?
  1. done
  2. verified by saving the element being worked on, and then inspecting it:
Screenshot 2025-07-11 at 11 34 45

@vzaidman vzaidman requested a review from motiz88 July 11, 2025 10:36
@vzaidman vzaidman merged commit 0a50c35 into main Jul 14, 2025
5 checks passed
@vzaidman vzaidman deleted the track-unresolved-urls-in-stack-trace-frames branch July 29, 2025 09:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants