Open 0xdevalias opened 1 year ago
- https://developer.chrome.com/blog/new-in-devtools-120/#ignore-list-spec
The source maps specification has adopted the
ignoreList
field instead ofx_google_ignoreList
and DevTools now supports the new name with a fallback for the old one. Frameworks and bundlers can now use the new field name.Originally posted by @0xdevalias in https://github.com/facebook/react/issues/27774#issuecomment-1836969520
Describe the problem
Currently, while debugging applications using Chrome DevTools, developers often face the challenge of navigating through not only their own code but also through extensive third-party library or framework code. This situation arises particularly in projects with complex structures and numerous dependencies, leading to a cumbersome and time-consuming debugging process.
Describe the proposed solution
Introduce the
x_google_ignoreList
extension in the sourcemaps generated by this project. This will facilitate a more streamlined debugging experience in Chrome (and other supporting browsers) by automatically filtering out framework and dependency code.Benefit
Implementing
x_google_ignoreList
in the sourcemaps will align this project with modern web development practices, offering a more focused and efficient debugging experience for developers using Chrome DevTools. This change will particularly benefit those who regularly engage in debugging complex applications with numerous dependencies.Background Context
Alternatives considered
1. Manual Filtering in Chrome DevTools:
The first alternative involves the use of manual filtering within Chrome DevTools. This method requires developers to individually specify scripts or code segments to be skipped during debugging. While this provides a basic level of control, it is inefficient and time-consuming, particularly in larger projects with numerous dependencies. Each developer must set up these filters, leading to inconsistent experiences and increased setup time for each debugging session.
2. Community Plugins or Extensions:
Another option is to use community-developed plugins or extensions that offer functionality similar to
x_google_ignoreList
. This approach could be a quick fix, providing an interim solution without requiring significant development effort from our team. However, it depends heavily on the reliability and continued support of these third-party solutions. There's also a risk of these plugins not being fully compatible with all versions of Chrome or other browsers, and they may not integrate as seamlessly as a native solution would.Evaluation of Alternatives:
Conclusion:
While both of these alternatives offer some benefits, they fall short in terms of efficiency, consistency, and reliability compared to the proposed implementation of
x_google_ignoreList
in our sourcemaps. The native integration ofx_google_ignoreList
with Chrome DevTools ensures a more streamlined and uniform debugging experience, aligning our project with modern web development practices.Importance
would make my life easier
See Also