Jump back to the line of exception occurred during debugging

HI,

I know during debugging, there are options like "run to cursor", "skip to cursor" and "run to cursor non-stop" which allow us to replay some part of code, but this is only valid when no exception occurred. I wondering if there is a way to let me jump back to the line before the exception occur ? The purpose of this is to quickly location the bug location rather than step through the code line by line.

 

Cheers

5 comments
Comment actions Permalink

Jason Sobell Agreed, I hope someone from Rider team can actually answer this. The exception didn't stop at the correct line is painful, basically force you to debug your code line by line until the exception occur, when it occur, you have to stop and return the application again because cant reply the exception with the current frame. 

0
Comment actions Permalink

I've posted this as a support request.

Here's a video of debugging a tiny application with an exception in an external library: https://screenrec.com/share/eahKm2YoDy 

It seems really bizarre to me. Surely there can't be only the two of us in here experiencing this?

0
Comment actions Permalink

OK, well I think I've found the magic combination.

It turns out that enabling "Only break on exceptions thrown from user code" in the Breakpoints dialogue prevents you seeing any contextual information if an exception is raised in an external library.

So that option quite literally means "Only break and show context if you throw an exception in your own source code, or do a core error (such as divide by zero)", and not "Only show me the exception context in the stack trace from my own source upwards" which is the impression the option text gives.

Also, if you don't have "CLR Exception Breakpoints/Any Exception" enabled, it just stops with no context information, and your source lines don't appear in the stack trace at all. Very confusing!

Perhaps we need a 'Set default debugging options' menu command to set the defaults to a usable state for typical debugging?

I and several other people have struggled with this for a long time, suggesting that it's probably unintuitive rather than that we're all incompetent :)

0
Comment actions Permalink

Hi Jason Sobell

Thank you for the feedback. Did I understand correctly? that you're looking for several presets for different debug scenarios? While there are a few methods to introduce feature requests, I think your best choice here would be to use our tracker here and submit a request. On the tracker, others can see your request and add their vote if they find such a tool would be useful, which helps our team to understand better which features/tools our users are eager for. I believe this can help give the best visibility for your request.

0

Please sign in to leave a comment.