we have all luxury with Firebug , Editing Html (In-Browser ) , CSS (In-Browser ) , But if any one working with javascript , each and every time JavaScript file has to be edited and Refresh the browser . Can we not have the such facility with Javascript in FireBug ?
Thanks In Advance .
we have all luxury with Firebug , Editing Html (In-Browser ) , CSS (In-Browser ) , But if any one working with javascript , each and every time JavaScript file has to be edited and Refresh the browser . Can we not have the such facility with Javascript in FireBug ?
Thanks In Advance .
Share Improve this question asked Jan 25, 2012 at 5:59 VirendraVirendra 3871 gold badge7 silver badges15 bronze badges2 Answers
Reset to default 2The thing is, JavaScript is not as simple as HTML or CSS. You can change the page's contents or the style at will and it just updates, but if you change the code... well, say you change myvar = 1
to myvar = 9999999
- that's quite a difference, and that could have an enormous impact on the page. Reloading is the only way around it.
However if you have a console on Firebug, you can redefine individual functions by copying their source, replacing the contents with something new, and assigning the new function to the old one's name. Just beware that you lose the closure the function was in if you do that.
You can use mand line editor to execute arbitrary JS. Here is a previous post on this: How to edit JavaScript in Firebug?
More on js console: http://getfirebug./mandline
The other thing you can do is set a break point and change a variable on the fly.
发布者:admin,转转请注明出处:http://www.yc00.com/questions/1745272872a4619856.html
评论列表(0条)