This error for me was due to upgrading a package dependency. Once downgraded, the error went away. Added back, the app crashed again via the dreaded "Lost connection to device. Exited." message. It took a while though because the dependency package was upgraded along with some other packages and SDK-related stuff.
I'd suggest one of two things; 1) start disabling packages, or 2) create a new app and add your app into it, piecemeal.
The dependency in my case (every case would likely be different) was the http package (v1.5.0). Once downgraded back to v1.4.0, the crashes stopped.
I've had this happen with other packages, though, also, like routing packages, and they can take hours to days to debug because the error can happen in some asynchronous call that happened dozens of debugging steps before the actual crash, and the logs give no help whatsoever.
Lost connection to device. Exited. | GL figuring it out. :P