I sometimes resort to what I call the Mongolian Hordes Debugging technique in these circumstances. Large numbers of showlns or output log entries to a log file to determine how far the program is getting and isolate exactly what it is getting stuck on. You can start with a few and then progressively add more in between the last log entry that is generated and the next one that isn't.

Sometimes I leave them in the program, activated by a command line switch for future use. Can be useful when this happens on a customer's system and you can't duplicate on your own side.

If it seems to be hanging on a login to the SQL server, you might try modifying your connection string to use an IP address/port # rather than the server/instance name. We've had problems on some customers with name resolution and resorting to one or both of these fixes the issue (but in both of these cases we get errors reported, not application hanging). Of course this is at the expense of having issues if the network address of the server is changed in the future.