I'm used to developing in many languages and for the most part, I use the same techniques for debugging, a.k.a printing variables and changing code flow. When available, I use breakpoints of course, but thats not always possible. Think embedded systems. For javascript on the client side, I use the console API.