DEV Community

Le Vuong
Le Vuong

Posted on

Visual Studio - How to view exception without exception variable

When debugging a program and you got exception, but the catch statement don't include exception variable, like below image, what should you do?

Just use Visual Studio $exception special variable, put it in "Watch" or print in "Immediate" window, then you can view the exception.

Top comments (0)