简体   繁体   English

Chrome开发者工具未反映对我的JavaScript文件保存的更改

[英]Chrome Developer tool not reflecting saved changes to my JavaScript file

I am debugging my code using chrome developer tools(CDT), and I noticed an error with one of the classes I declared. 我正在使用chrome开发人员工具(CDT)调试代码,并且发现我声明的其中一个类出错。 I wrote 我写

original input: 原始输入:

class Person = {
  constructor(name) {
    this.name = name;
  }
}

so CDT gave me an error Uncaught SyntaxError: Unexpected token = Cool.. I opened my file in atom and fixed the error, and saved my file. 因此CDT给了我一个错误Uncaught SyntaxError: Unexpected token = Cool ..我在atom中打开了我的文件并修复了错误,并保存了我的文件。

New input: 新输入:

class Person {
  constructor(name) {
    this.name = name;
  }
}

I reopened CDT to reinspect my js file but the CDT sources still shows the original input and the console still displays error Uncaught SyntaxError: Unexpected token = 我重新打开CDT以重新检查我的js文件,但CDT sources仍然显示原始输入,并且console仍显示错误Uncaught SyntaxError: Unexpected token =

I have tried inspecting my file on firefox and I get the same error. 我尝试检查我在firefox上的文件,但遇到相同的错误。 I have closed my js file and reopened it. 我已经关闭我的js文件并重新打开它。 atom shows that my changes(new input) was saved, but for some reason chrome and firefox only sees the previous version of my file. atom显示我的更改(新输入)已保存,但是出于某些原因,chrome和firefox仅看到我文件的先前版本。 Please advice. 请指教。

Thanks in advance 提前致谢

清除历史记录,然后重试!!!

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM