Without knowing anything of your solution : put a breakpoint in the entry point, lauch your solution in Debug (F5) mode, follow the execution (F10, F11...) until you find where is the problem.
EDIT : if you want to debug the application when it is running on the server , you may have to install the Remote Debugging Monitor.
Here is a link which explains its use:
How to: Run the Remote Debugging Monitor[
^]