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:
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)
- Unpause the debugger
----------------------
If you have the file prettified, Chrome will not allow edits. I turned
it off and was able to edit. Willing to bet this is/was your problem.
Chốt:
- Đặt breakpoint
- Ctrl+F5
- Edit javascript
- Ctrl+S
- những file gốc (có dạng http://path/to/file.js) => được Edit
- những file đã được chrome format lại cho đẹp và dễ nhìn dễ đọc code (có dạng http://path/to/file.js:formatted) => KHÔNG được edit
No comments:
Post a Comment