I would like the form in C# to crash when something happens, like accessing an array/using a null variable.
I use C++ mainly, which usually crashes on the spot, so I know the problem immediately.
Since I am to C#, I mainly write my stuff within the function, and the callstack simply reveals the OnPaint function being called. So I've no idea where it is calling the exception.
Couldn't find any solution and manually looking for the problem is really taking me too much time.
Though it would be ideal for me to get these 2 solutions, either 1 would work.
- Getting it to crash instead of throwing exception!
- Some way for the Callstack to show me where I am, it only shows OnPaint, where my OnPaint function has like many lines, thus taking me forever to debug it.
p.s I understand that I should have created separate functions to be called within, but I wasn't sure how to do it in C# initially when I just wanted to create this program quickly for its purpose.
Thank you in advance!