简体   繁体   English

在Chrome中进行调试:删除功能

[英]Debugging in Chrome: Delete a Function

In Chrome's developer tools, is it possible to delete a function and re-write it? 在Chrome的开发人员工具中,是否可以删除功能并重新编写功能?

I have deleted it from the scripts tab and pasted a revised function into the console. 我已从“脚本”选项卡中将其删除,并将已修改的功能粘贴到控制台中。 But it appears the older function has not been removed from the DOM. 但是,似乎较旧的功能尚未从DOM中删除。

After you have deleted your function from the Scripts panel, make sure you hit Ctrl-S to actually commit your change. 从“脚本”面板中删除函数后,请确保按Ctrl-S以实际提交更改。 You can also paste the new version of the function in place of the old one in the same script before committing. 您也可以在提交之前将新版本的功能粘贴到同一脚本中,以代替旧版本。

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

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