Re: Clone an object in the firefox console

37 views
Skip to first unread message

Sebastian Zartner

unread,
Jun 12, 2013, 4:47:56 PM6/12/13
to fir...@googlegroups.com
I am trying to debug PDF.js source code, I want to copy matrix / array values (instead of just storing the object reference) in JavaScript. How can I do that in firebug?
I'm not exactly sure what you mean, but you can use the Command Line to assign values to variables and execute any code you like in the page's context. The Command Line also has some special commands and console functions.

I also want to know is there any way to go to any position in a loop by assigning the value to the variable (if yes how do I assign values to the loop variable?)
There are two ways to achieve that:
  • Set a breakpoint condition
    This allows you to stop the script at the breakpoint when a specific condition is met, e.g. when your counter variable has a specific value.
  • Change the variable inside the Watch side panel
    While the script execution is halted you can change the values of all variables available inside the current stack frame by double-clicking it inside the Watch side panel, entering the new value and hitting Enter.

Sebastian

Reply all
Reply to author
Forward
0 new messages