I was reading that using anonymous functions in javascript is bad practice, because it can make debugging a pain, but I haven't seen this for myself. Are anonymous functions in JavaScript really bad practice and, if so, why?
Nope, anonymous functions are used all over the place in JavaScript across the web. It may make debugging a little more difficult in spots, but not nearly enough to say that they shouldn't be used.
For example, JQuery makes extensive use of them.
Their are a lot of times when you want to use them over formally declared functions, such as when you want to limit their scope.
I would say the contrary, lambdas ( alias ) make some expressions much more succinct. If you're binding multiple event handlers to multiple events it would be tedious giving a function name to each and every event handler, for example.
It's more helpful and time-conserving than not, even if it makes debugging a little bit harder but I rarely struggle with debugging because a function is anonymous. And you should use JSLint to make your life easier when coding.
Most definitely not, lambda functions are used all over the place, almost ubiquitous.
Just because everybody uses them doesn't make them good practice (everybody remember using the table element for layout?). But, they're great because they can help clarify and simplify your code, giving less opportunity for something to go wrong.
But, anonymous functions shouldn't be so complicated that debugging becomes difficult with them. In that case, perhaps it's better to make a new function.