简体   繁体   English

在Chrome开发者控制台上编辑Javascript文件不起作用

[英]Editing Javascript files on Chrome Developer Console not working

I followed this tutorial on how to get my Javascript changes to save, and my changes are indeed "saved", in that I can see the changes when I reload the website. 我按照本教程讲解如何保存我的Javascript更改,并且所做的更改确实已“保存”,因为当我重新加载网站时可以看到更改。 Despite this, the saved changes are not actually run, and do not seem to even exist in the website's mind, since an error that had occurred on Line XYZ still does, despite the code on Line XYZ being shifted down. 尽管如此,保存的更改实际上并没有运行,甚至在网站的脑海中似乎也不存在,因为尽管XYZ上的代码被下移了,但在XYZ上发生的错误仍然存​​在。

I also saw something about the code not running if it was prettified. 我还看到了一些有关代码如果经过修饰就无法运行的信息。 I cannot seem to unpretify it though, because the {} thing on the bottom left does not seem to change anything. 不过,我似乎不能不敢恭维,因为左下角的{}东西似乎并没有改变任何东西。

reolad the website will reload all js files, so your changes will be lost. reolad the website将重新加载所有js文件,因此您的更改将丢失。 If you insert a breakpoint in line 100, and change your code after this line, your change will be executed after you stash js file and resume executing. 如果您在第100行中插入一个断点,并在此行之后更改代码,则在存储js文件并恢复执行后将执行您的更改。

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

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