Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Does a tool exist for dynamically altering running javascript in a browser? [closed]

Does a tool exist for dynamically altering running javascript in a browser? For example, to change the values of javascript variables during runtime.

like image 906
Gary Willoughby Avatar asked Dec 14 '22 06:12

Gary Willoughby


2 Answers

So, Firebug really is one of the best options - or, if you are a developer that owns Visual Studio and want to debug using IE, you can do that. Let's assume you will do this with Firebug using Firefox.

First, determine where you want to alter the code and place the following line just before the line you want to start messing with:

debugger;

That will cause Firebug to stop the execution of the script at that point, at which point you can then step through the code and alter the values of variables.

You can also use Firebug to place breakpoints in by clicking to the left of a line of code in the script window of Firebug:

Firebug Breakpoint Screenshot

like image 172
Jason Bunting Avatar answered Dec 15 '22 19:12

Jason Bunting


Firebug , or Venkman Javascript Debugger .

like image 37
Geo Avatar answered Dec 15 '22 18:12

Geo