Debug through source files in Chrome DevTools
Dashiing opened this issue · 5 comments
Thanks for the initiative in creating this CLI tool for Chrome extensions with Angular.
What I thing it's missing is not having the option to analyze and debug the angular app implementation with source code.
After creating a new project and starting it I get the fallowing warnings when inspecting the Angular popup:
DevTools failed to parse SourceMap: chrome-extension://jchfjdadafmbllfnkkmnoopppgkpdboj/runtime.js.map
DevTools failed to parse SourceMap: chrome-extension://jchfjdadafmbllfnkkmnoopppgkpdboj/polyfills.js.map
DevTools failed to parse SourceMap: chrome-extension://jchfjdadafmbllfnkkmnoopppgkpdboj/styles.js.map
DevTools failed to parse SourceMap: chrome-extension://jchfjdadafmbllfnkkmnoopppgkpdboj/vendor.js.map
DevTools failed to parse SourceMap: chrome-extension://jchfjdadafmbllfnkkmnoopppgkpdboj/main.js.map
DevTools failed to parse SourceMap: chrome-extension://jchfjdadafmbllfnkkmnoopppgkpdboj/modules-popup-popup-module.js.map
This is surely related. Don't know if there is an issue with the generated source maps.
For some reason source maps for SCSS seem OK and e.g. styles.scss can be open fine with Chrome DevTools.
Hi, thanks for reporting this issue, i think it can't be fixed at the moment.
Google Chrome doesn't allow source-maps inside a popup somehow, although when you click on the source map, it shows itself..
If you have an idea how to fix this, let me know.
I've been digging into this issue to see if I could find a solution, but it seems to be a bug on Chrome. A fix might come around on Chrome v82:
https://bugs.chromium.org/p/chromium/issues/detail?id=1052872#c14
So nothing we can do at the moment I guess.
Ill keep this issue open to see if it needs a fix from our side later on.
I found a workaround! See https://stackoverflow.com/questions/67470089/chrome-extension-development-with-angular-how-to-include-source-maps/67482483#67482483
You can include this workaround into your template.
Do note that at least one contact I have is not hitting this issue on his Mac OSX based Chrome browser. My hypothesis is that the issue only occurs on Windows.