How to debug my webcam problems?

As commented by @aglasser to fix the Cam not working simply:

  • Open Terminal.app; and
  • Run: sudo killall VDCAssistant

In order to resolve another similar issue with the built-in Microphone:

  • Open Terminal.app; and
  • Run: sudo killall coreaudio