3

I can't find great way to debug javascript. I know firebug on firefox, but it's not best way I think. I want to put break point and trace program but I can't with it. Do you know good tool or how to trace the program.

3
  • 9
    You can put break point and trace in Firebug. Commented Jun 18, 2010 at 7:20
  • 2
    Firebug facilitates everything you've just listed. Under the script toolbar, you can add breakpoints and step through your program. Also, inside your code, throwing things into console.log is extremely helpful. Commented Jun 18, 2010 at 7:22
  • 5
    You could have searched stackoverflow: stackoverflow.com/questions/988363/… stackoverflow.com/questions/1739221/… and several others, in fact. Commented Jun 18, 2010 at 7:24

6 Answers 6

1

Venkman JavaScript Debugger

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

Comments

1

I believe this is what you're looking for:
http://weblogs.asp.net/scottgu/archive/2007/07/19/vs-2008-javascript-debugging.aspx

N.S.

Comments

1

Firebug Extension for Firefox (Yes, it also supports breakpoints) or the Webkit Inspector that's built into Safari and Chrome by default.

Both offer JavaScript debugging/profiling and a lot of other useful features.

Comments

0

I find IE 8 Developer Tools (built into IE 8) and Visual Studio (2008, Express is free) are an excellent way to debug JavaScript -- at least in an environment compatible with the above tools :-)

3 Comments

considering, that IE8 is ... IE8 and that VS is rather heavy (ok, maybe not for most ppl out there), and also that IE + VS is basically solution for Win OS only (we don't know which one OP is working on) - this solution is not a good choice. I have IE8 and VS2010, but I can't live without firebug extension, when it comes to web dev (OP simply couldn't find the right tools)
Seriously, I'm not sure why I got a down-vote. Please read the full answer "at least in an environment compatible with the above tools" -- in which case, my answer is as good as any, even if you are a Firefox/Firebug supporter.
it's not mine down-vote. I know that your answer is a solution, but not for everyone (what probably is the reason behind this down-vote)
0

Chrome has some very nice developer tools as well.

Comments

0

Add the snippet debugger; in your javascript code that will allow you to debug on the browser console

function myFunction(){
        //Some stuff
        debugger;  //Debugging is automatically started from here
        //Some stuff
    }
    myFunction();

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.