Added a debug mode for client

I thought I had created a pull request for this already.  Apparently not.