Can I determine why my Roku device crashes in development?

Sometimes the entire device crashes and I get “Connection closed by foreign host.” from my debugger.

Is there any way to determine what caused the panic attack?