| Author |
Best Practice in JavaScript Debugging
|
Dave Hayward
Greenhorn
Joined: Feb 28, 2007
Posts: 14
|
|
Hey Everyone,
I have found that most of my time is spent in trying to debug JavaScript to work cross-browser. I am limited to the "Alert" method of debugging, and I really want to know if there is a better way to debug JavaScript. I focus on IE, Firefox, and Chrome browsers. So a cross-browser tool would be fantastic, but I'll take what I can get.
Thanks a ton,
Einstein47
|
 |
Eric Pascarello
author
Rancher
Joined: Nov 08, 2001
Posts: 15357
|
|
All modern browsers have a JavaScript console. Use console.log
https://developers.google.com/chrome-developer-tools/docs/console
http://msdn.microsoft.com/en-us/library/gg699336%28v=vs.85%29.aspx
https://getfirebug.com/wiki/index.php/Console_API
Eric
|
 |
Bear Bibeault
Author and ninkuma
Marshal
Joined: Jan 10, 2002
Posts: 56185
|
|
|
Why are you limited to alerts, which are the worst debugging "tool" possible? All modern browsers have built-in JavaScript debuggers (Firebug for Firefox).
|
[Smart Questions] [JSP FAQ] [Books by Bear] [Bear's FrontMan] [About Bear]
|
 |
Dave Hayward
Greenhorn
Joined: Feb 28, 2007
Posts: 14
|
|
The reason I am "limited" is because when I taught myself JavaScript back in the late '90s - it was the only option. I have not stayed on top of all the changes in technology (my own fault, you get busy and need to choose what to focus your time on). And now I am getting back into JavaScript editing (mostly to help co-workers), and I wasn't aware of all these great tools.
Thank you very much for your helpful posts.
Einstein47
|
 |
Ido Green
author
Greenhorn
Joined: Jul 27, 2010
Posts: 25
|
|
I would recommend you to watch some of the great videos/tutorial that Paul Irish made on Chrome Dev Tools: http://paulirish.com/?s=devtools
so many powerful tips you can leverage later... ;)
|
 |
Bear Bibeault
Author and ninkuma
Marshal
Joined: Jan 10, 2002
Posts: 56185
|
|
|
I do most of my development in Chrome/Safari precisely because of these tools.
|
 |
 |
|
|
subject: Best Practice in JavaScript Debugging
|
|
|