How to make C# application crash

后端 未结 12 2184
渐次进展
渐次进展 2020-12-31 13:00

I want to test if my application crash dump can be debugged. But firstly, I need to generate a crash dump of my application. I\'m using C# to code my app, and have tried wit

12条回答
  •  感动是毒
    2020-12-31 13:43

    It's easy enough to reproduce if you try to transform a null game object. For example, like this:

    public static GameObject gameObjectCrash;
    public void GenerateCrash()
    {
        gameObjectCrash.transform.rotation = Quaternion.Euler(90, 0, 0);
    }
    

提交回复
热议问题