javascript - Chrome DevTools do not show .js files - Stack Overflow

I'm developing a small Angular app and I'm trying to debug it in Chrome DevTools. However, I

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
 |  Show 3 more ments

1 Answer 1

Reset to default 9

You 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

发布者:admin,转转请注明出处:http://www.yc00.com/questions/1744235075a4564434.html

相关推荐

  • javascript - Chrome DevTools do not show .js files - Stack Overflow

    I'm developing a small Angular app and I'm trying to debug it in Chrome DevTools. However, I

    8天前
    10

发表回复

评论列表(0条)

  • 暂无评论

联系我们

400-800-8888

在线咨询: QQ交谈

邮件:admin@example.com

工作时间:周一至周五,9:30-18:30,节假日休息

关注微信