Reputation: 1003
Currently I have a block of code with try and catch
. In try block i have used some logic based on IO and Database
, Now how to know that which line of code generates / getting an exception in try block for io or db related code.
Upvotes: 1
Views: 153
Reputation: 6461
Its Pretty Simple in .Net. In Your .Net Window Press Ctrl
+ Alt
+ E
. The Exceptions window will be opened. There you can see Common Language Runtime Exceptions
Enable those two check boxes. You can get the Error line when ever the Exception is occurred. After pressing F5
it will goes to catch block
.
Upvotes: 5