每次我在 .ts 文件中添加断点时,Chrome 都会烦人地在 main.bundle.ts 中打开相应的行 [英] Chrome annoyingly opens a corresponding line in main.bundle.ts every time I add a breakpoint in a .ts file

查看:25
本文介绍了每次我在 .ts 文件中添加断点时,Chrome 都会烦人地在 main.bundle.ts 中打开相应的行的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在开发 Angular (v4.3.5) SPA,使用 Angular CLI 的 ng serve 命令为其提供服务,并通过 Chrome 开发者工具对其进行调试.上周开始发生一些奇怪的事情,我似乎无法将其更改为以前的方式:在 Chrome 开发工具中,当我单击行号以在 .ts<中添加断点时/code> 文件,Chrome Dev Tools 也会在 main.bundle.ts 中打开相应的行,所以现在每次添加断点时我都必须关闭 main.bundle.ts 或单击返回 .ts 文件的标题.这很烦人.默认设置有什么新的变化吗?因为我找不到与此相关的任何内容(尽管我什至不确定如何在 google 上搜索此问题...)

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...)

所以我的问题是:如何强制 Chrome 在每次添加断点时不打开 main.bundle.ts?

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

我刚刚发现这个问题只有在我从 Visual Studio Code 终端运行 ng serve 时才会发生.

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

推荐答案

看起来像是 Chrome 错误 - 将其更新到版本 61.0.3163.79 解决了我的问题.

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

这篇关于每次我在 .ts 文件中添加断点时,Chrome 都会烦人地在 main.bundle.ts 中打开相应的行的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆