Chrome annoyingly opens a corresponding line in main.bundle.ts every time I add a breakpoint in a .ts file

痞子三分冷 提交于 2019-12-10 05:31:01

问题


I'm developing an Angular (v4.3.5) SPA, serving it with Angular CLI's ng serve command and debugging it through Chrome Developer Tools. Last week something strange started to happen and I can't seem to do anything to change it to the way it was before: in Chrome Dev Tools, when I click on the line number to add a breakpoint in my .ts files, Chrome Dev Tools also open the corresponding line in main.bundle.ts, so now every single time I add a breakpoint I have to close main.bundle.ts or click back on the title of .ts file. It's very annoying. Is there a new change in default settings or something? Because I couldn't find anything related to that (although I'm not even sure how to google this issue...)

So my question is: what can I do to force Chrome not to open main.bundle.ts every time I add a breakpoint?

EDIT: I just found out this issue happens only when I run ng serve from Visual Studio Code terminal.


回答1:


This worked for me (chromeDevTools):

Map webpack://./ to / in your project workspace




回答2:


Looks like it was a Chrome bug - updating it to Version 61.0.3163.79 solved my problem.



来源:https://stackoverflow.com/questions/45810011/chrome-annoyingly-opens-a-corresponding-line-in-main-bundle-ts-every-time-i-add

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!