Debugging shell scripts

Any there any utilities or ways of debugging shell scripts?

I know something like: sh -x <script>

As far as I know thats the only way...