Added a very handy debug function.