Debugging when GMOD just closes upon crash with no errors.

I am working on a gamemode, but for some reason the Garry’s Mod suddenly crashes sometimes, with no errors. (Just closes)

Is there a way to debug this?

Or do you know the possible reasons why? (Of course if the number of reasons isen’t overwhelming.)