Ios App Crashes When Not Debugging

I am facing a strange issue in my currently working app.
Ios app crashes when not debugging. I am totally confused and how can i solve the issue. Debug information is set to full for the core and ios projects. However there are times when the os will terminate your app and generate a crash log if the app didn t respond fast enough.
Ios app crashes immediately when debugging applewatch app on simulator not on device ask question. I m currently building an app with cordova and it appears that on the last alpha version the app only works in the ios simulator. Normally if it s an error that s affecting various people the creators of the apps immediately realize the problem and will soon publish an updated version of the app with the solution.
But i am not able to regenerate the issue through debugging. Using xcode 12 on the other hand when i use firebase app distribution to install my app ad hoc it s able to run fine on ios 14. An internal error or bug may have brought the app down.
Sometimes app crashing is not caused by your phone but rather the app itself. When ran on an iphone x the app is crashes immediately. It seems that the app runs when debugging is enabled and crashes when it is disabled regardless of other factors.
I ve tried resetting the simulator but problem persists. The challenge is to understand the real reason behind the crash and apply the proper fix not just hide the crash. Note that the parent app runs fine when the applewatch is running and i m using a real iphone.
Building the app in debug mode but with debugging disabled also leads to the app crashing on the device. As you re probably aware since ios 4 x most of the time when you quit an ios app the app isn t terminated instead it s sent to the background. I m not familiar at all with software development for apple platform so i was wondering.