admin管理员组文章数量:1401604
I'm developing a small Angular app and I'm trying to debug it in Chrome DevTools. However, I can only see .ts files there.
How can I see and debug the .js files that .ts files pile to?
My 'Enable JavaScript source map' option in DevTools settings is turned on.
I'm developing a small Angular app and I'm trying to debug it in Chrome DevTools. However, I can only see .ts files there.
How can I see and debug the .js files that .ts files pile to?
My 'Enable JavaScript source map' option in DevTools settings is turned on.
Share Improve this question edited Dec 28, 2019 at 13:22 Sofia Bo asked Dec 28, 2019 at 11:10 Sofia BoSofia Bo 7791 gold badge10 silver badges20 bronze badges 8- 2 Any particular reason for this need? – Hugo Noro Commented Dec 28, 2019 at 11:19
- you can check this link stackoverflow./a/50290220/5146848 – Sifat Haque Commented Dec 28, 2019 at 11:19
- 1 Does this answer your question? Chrome sources not showing a file that was generated from Typescript and has a source map – Reactgular Commented Dec 28, 2019 at 11:46
- did u build source code in JIT mode? This mode will not encoded your code and allow u to debug by browser. – Hoang Subin Commented Dec 28, 2019 at 13:26
- Any particular reason? Well, wanted to debug the .js code + to see what .ts piles to. And no, unfortunately, links above did not help. I updated my answer with te information from them. – Sofia Bo Commented Dec 28, 2019 at 13:26
1 Answer
Reset to default 9You need to disable Javascript Sourcemap:
Not in the question but if you need it for the SCSS/CSS files, there is also a CSS source map option there.
Another obscure way to disable it is if somehow do not want to change Chrome's settings and you have control of your server, you can configure it not to generate the source map line, it depends on your server-side generator/piler. You need to check the documentation to see how it works. The source map line should be at the end of the generated js file and look like this:
//# sourceMappingURL=/path/to/file.js.map
本文标签: javascriptChrome DevTools do not show js filesStack Overflow
版权声明:本文标题:javascript - Chrome DevTools do not show .js files - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1744235074a2596518.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论