0

Is there any way to see all the javascript variables that are being used by a script (or scripts) in a website page? I have Firebug installed and I've been playing around with it and searching online but I can't find an answer.

4
  • There's the 'watch' option in Firebug's script section, which lets you watch live updates of variable values, but you have to add those variables to the list yourself. Commented Oct 2, 2012 at 21:58
  • You can see all the 'global' ones... Commented Oct 2, 2012 at 21:58
  • In the DOM tab of Firebug you can see all global variables, if that's what you want. Commented Oct 2, 2012 at 21:59
  • 1
    There's no way to see all variables set in all functions, in all scopes, in real-time, if that's what you're looking for... Commented Oct 2, 2012 at 22:00

1 Answer 1

2

You have to have a script on your page, then you open the script in firebug and set a breakpoint on one of the lines, then refresh your page. You should then see a list of all the variables on the right.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.