Debugging
Debugging Shiny applications can be a bit tricky at times. Unlike many analytics applications, using R outputs cannot be stepped through simply, and sometimes, error messages can be a little difficult to understand. Shiny does have some quite useful debugging functions, and there are some sensible practices to be used whenever you write Shiny code that should help you to avoid too many problems with debugging.
Good practice when coding Shiny applications
Probably, the most effective weapon in your armory when you are trying to write bug-free code that is easy to maintain is always making sure that anything you write within Shiny will also run outside of Shiny. You would be amazed how often this rule is violated in forum questions. Error messages can often be obscure, and fixing your code based on the messages that Shiny brings back can often be futile. Break the offending piece of code out of the Shiny application and ensure that it works in a standard interactive R call.
Once you...