How do I trap an "Exception" in VB.net?

Mugsy's RapSheet 156 Reputation points
2023-07-30T20:44:55.5366667+00:00

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?

TIA

VB
VB
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