Over the weekend, I had an interesting idea and implemented it. It’s kinda funny … and kinda cool. Some might even think kinda sick … but I like it.
I’m currently working on some PHP scripts that are processing mail. Lots of mail. As we are now entering into beta test, I’m having to update the scripts in two different ways … both to implement user preferences, and also to deal with all sorts of mail formats. Oh … and I’m also having an interesting MySQL Database disconnect problem I’m looking into. As I’m now into my third week of debugging, the scripts are getting hardened, and I’m having fewer problems, but there are still times when the script will crash. I then have to investigate the issue, write code to deal with the exception, and then restart the scripts.
My issue is that I don’t want to just sit and watch my console … waiting for bugs. So this weekend, I started to do some remote debugging using my cell phone and SMS/Text messaging … and it worked! In my code I’ve put a variety of traps to catch exceptions when they occur, and I have the code send me a SMS/Text message as it crashes. I get the error message, and know immediately that I have a problem. I then have the choice of heading over to my computer to debug, or I can even connect remotely to my server via SSH – from my cell phone – connect to the screen session and look at the output from the script. What is cool is that it’s working … I’ve got text messages and went over to my computer and, sure enough, found the crashed script … fixed the bug … and restarted things.
I haven’t yet been out of the house or office when the problems occurred … but I’m almost looking forward to when that occurs! Just so that I can do the remote SSH debug … it’ll be fun to see …