2

How do i trace the values of local variables in closure, and also the execution flow of closures in firebug. or is there any other tools that is specifically for debugging closures.

3 Answers 3

1

Yes. You can debug the javascript closure with Firebug. On Script tab, you can see all the object instances as well as the state of the whole object. Please, Find it below the screenshot of firebug showing local variables in closure.


(source: pengbos.com)

If you want to learn more read this here and practice it.

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

Comments

0

In Google Chrome's Developer Tools you can inspect the closure stack by setting a breakpoint (in the Scope Variables section):

Closure stack inspection in Chrome Developer Tools

I would assume Firebug has similar functionality.

Comments

0

You can see Closure Inspector of Firebug.

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.