I came across this today, when I was playing around with someone else's website.
(今天我遇到了这个,当时我和其他人的网站一起玩。)
I realized I could attach a break-point in the debugger to some line of code before what I wanted to dynamically edit.
(我意识到在我想要动态编辑之前 ,我可以在调试器中附加一个断点到某些代码行 。)
And since break-points stay even after a reload of the page , I was able to edit the changes I wanted while paused at break-point and then continued to let the page load.(而且由于断点在重新加载页面之后仍然存在 ,我能够在断点处暂停时编辑我想要的更改,然后继续让页面加载。)
So as a quick work around, and if it works with your situation:
(因此,快速解决,如果它适用于您的情况:)
- Add a break-point at an earlier point in the script
(在脚本的早期位置添加断点)
- Reload page
(重新加载页面)
- Edit your changes into the code
(将更改编辑到代码中)
- CTRL + s (save changes)
(CTRL + s (保存更改))
- Unpause the debugger
(取消暂停调试器)
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…