Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is there a way to change variable values while debugging JavaScript?

Tags:

I have a breakpoint on this piece of code (using Firebug):

if (validator.formValidate([dom.forumid]))

How can I skip this validation part and get into the if clause even if my dom.forumid is not valid, i.e. the call to formValidate() returns false? So how can I make it return true?

I was thinking about modifying the JavaScript, but I don't know how that's done.

like image 911
user1534664 Avatar asked May 10 '14 18:05

user1534664


People also ask

Is it possible to change the value of a variable while debugging?

Yes u can if you have the authorization: while debugging do a doubleclick on the variable, the system'll show the name and the value of the variable, change the value and press CHANGE icon.


1 Answers

As of today (Chrome 67) you can just double-click any variable on the right hand side under the "Scope" section and edit it in real-time.

enter image description here

like image 111
Nick Steele Avatar answered Oct 25 '22 20:10

Nick Steele