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

Mugsy's RapSheet 216 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

Developer technologies | VB
{count} votes

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.