How do I trap an "Exception" in

Mugsy's RapSheet 156 Reputation points

My program is crashing and I don't know why.

When I run it from VS (2022 64bit), it doesn't give me an error. It simply ends. The output windows reports:

"Exception thrown: 'System.ArgumentException' in Microsoft.VisualBasic.dll"

Doesn't even give me a line number. I have no idea what is causing my program to crash. How do I debug this?


An object-oriented programming language developed by Microsoft that is implemented on the .NET Framework. Previously known as Visual Basic .NET.
2,496 questions
{count} votes