How to determine which part of the game is crashing Unity Editor

HI all,

When i play my game in the Unity Editor, it runs for about 15s and then Unity freezes.
I tried the profiles but i don’t know what to look for.
Even if i manually disable parts of the code and find out which part of the code is causing it, how do i troubleshoot/debug the problem? I am quite inexperienced and new to Unity5

I really appreciate any help you can provide me.

Unity Editor crashes are often caused by infinite loops. Check all loops in your code one by one, especially the while loops. Make sure you don’t have any infinite recursive function. What script function (that contains a loop) could be called at the 15th second?

Yes, you are correct.
When i took a closer look at the code i found that in a loop i was transferring a object from one place to another (changing parents) and in once case there were no more object to transfer and the condition was always true after that so a endless loop with a recursion started to happen.