0

Possible Duplicate:
Debug Javascript

Every now and then i have one jquery object and i am not able to find whats inside it. I had to try many combinations like see the class name , id and other attributes to see what is that variable and sometime by hiding it.

Is there any proper way of debugging the jquery object to see whats inside it?

1
  • do you have firebug add-on in your mozilla browser? Commented Oct 16, 2012 at 8:20

2 Answers 2

1

Firebug, Internet Explorer Developer Toolbar, Chrome Developer Tools. These are some of the tools for some of the respective browsers.

Some IDES like eclipse let you debug inline.

Also there is a javascript statement : debugger;, which you can use for this purpose .

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

2 Comments

If you are using firebug you can use lot of tracers : console.log(object); console.debug(object); console.info(object); console.trace(object); You name it, everything's there .
thanks buddy , i use firebug but i didn't knew i could use the above functions
0

Using firebug or the chrome developer tools you can debug any javascript object. You need to add a breakpoint just after the object initialization and then add the object to the watch panel.

Object members are displayed in a tree view.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.