Recently I had the unpleasant experience of doing battle with an InfoPath form.
Our client had multiple servers that staff logged on to. The InfoPath form in question worked flawlessly on all but one of the terminal servers.
Users were complaining that occasionally the form would outright refuse to work. They had no idea why, and InfoPath provided no error messages to them at all. Everyone was in the dark!!
I initially used Message Boxes as my debugging method. Crude but effective. They lead me to a single function call that was failing. But why?!
Attempting to debug properly through the Visual Studio Tools for Applications debugger on the server would let me step through the code until suddenly, the debugger would silently crash! What a mystery!!
Thankfully all it took was a try catch block around the function to reveal the true error: a missing assembly. Specifically Microsoft.SharePoint.Client.dll
In the InfoPath code editor (VSTA), the references to Microsoft.SharePoint.Client.dll and Microsoft.SharePoint.Client.Runtime.dll required the copy local property to be set to true.
Republishing the form was all that was left. Once done, the form worked again!
What a headache