This is just one big flaming thread.
Some people can C&P to start learning then use the skills after and apply them to their own needs. No need to flame for that. If they want to, you have no right to judge them on that. Your only obligation is to either provide a helpful response or none at all.
Anyways, OP to answer you, if you're using visual studio, you can attach it to the process to debug why it crashes (In most cases.)