I work in an application that is JavaScript intense. So to debug , I end up using many alerts. Are there other better ways to debug ? What methods do you use ?
For JavaScript, debugging is a sinch in most browsers:
IE - Where you really need to debug, F12 is the console. You can call console.log
, console.debug
, console.error
and a few others, and it will print out good data. When you call console.log
on an object, good consoles will print out the property break-down of the object. There's also an active dom inspector so that you can see what's going on as the script is running.
For all browsers, you can add Firebug Lite, but I really only use it for IE and Safari.