最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

Can I modify Javascript code in Internet Explorer 11's debugger? - Stack Overflow

programmeradmin4浏览0评论

In IE11 I can right click on a webpage and call the "Inspect Element" tool. This allows me to modify HTML/CSS dynamically and is extremely useful.

I can choose "Edit as HTML" and do whatever I want without having to reload the page.

What I want is to be able to do the same in IE 11's Javascript debugger. I want to modify a script in the browser so that I do not have to reload the page entirely. The page I am working on takes 20-40seconds to load when I run it locally, meaning it takes about a minute to implement even the smallest changes in my file.js.

Can this be done?

In IE11 I can right click on a webpage and call the "Inspect Element" tool. This allows me to modify HTML/CSS dynamically and is extremely useful.

I can choose "Edit as HTML" and do whatever I want without having to reload the page.

What I want is to be able to do the same in IE 11's Javascript debugger. I want to modify a script in the browser so that I do not have to reload the page entirely. The page I am working on takes 20-40seconds to load when I run it locally, meaning it takes about a minute to implement even the smallest changes in my file.js.

Can this be done?

Share Improve this question asked Apr 29, 2015 at 14:31 John 'Mark' SmithJohn 'Mark' Smith 2,61410 gold badges47 silver badges70 bronze badges
Add a comment  | 

2 Answers 2

Reset to default 12

If the JS code is embed into the HTML it should work without any problems but if it's stored I an other file you probably can't edit it in the browser. I recommend using Firefox or chrome. Both have got an inbuilt and very useful editors which can edit HTML as well as Js and CSS .

I know this is an older post but this might help someone else.

"I just loaded up my website in Chrome and whilst I can edit the Javascript file (you can definitely edit Javascript when it is in a .html page) but I cannot get the changes I have made in the .js file to actually function."

If you set a breakpoint at the top of the .js file and refresh, you can edit the code that comes after the break point and chrome will load your new changes. Note that your changes will be wiped out after every refresh, but it will hit your breakpoint and allow you to add them again.

发布评论

评论列表(0)

  1. 暂无评论