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

Mugsy's RapSheet 176 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,780 questions
{count} votes

Your answer

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