In the good old days of VB6 when debugging an error I would temporarily type Resume within an error handler to take me back to the line which had caused the error.
Is there a way to do the same thing in C#? I am not talking about a permanent way to go back, this is just when you are debugging and you want to know which line caused the exception which you are currently in the catch statement for.
So just to be clear.
- I know something is causing an exception so I put a break point on the catch statement
- The debugger hits the break point in the catch, I want to know which line caused it and take the debugger back to it.
I can’t use the Debug > Options – throw on all exceptions as there are other exceptions in the app silently occurring (I didn’t write it).
Thanks
The stack trace in the exception will tell you what line it occurred on. You can then drag the yellow arrow back up to that line and resume debugging from there.