devtools icon indicating copy to clipboard operation
devtools copied to clipboard

<exception> variable should be available at all levels of the stack

Open DanTup opened this issue 6 years ago • 2 comments

Currently when an exception occurs, we inject an <exception> variable into the top stack frame. This means if you navigate up the stack (eg. if the exception occurred inside the assert implementation but you want to view the code that contained the condition) it's not longer visible.

It'd be better if this variable was "global" while you were paused on the exception so you can see it when at any level of the stack.

DanTup avatar Feb 06 '19 15:02 DanTup

Possibly? Or just do some work to make the location of the exception more visible? We could badge the frame with the exception with a small (e) icon for instance.

devoncarew avatar Feb 06 '19 16:02 devoncarew

I think having a popup for the exception directly in the code would be neat, but it's a bit weird not letting the user see the exception from the place where they consider if occurred. Consider:

assert(false);

This will break the debugger inside the assert implementation (which today has no source, but hopefully will change). The user really doesn't care about the assert implementation since the thing they need to look at is the line that called assert. Navigating to the frame that contains the assert call but not being able to see the exception text feels awkward (maybe assert is a bad example since the text is just "this condition failed", but in more complicated exceptions, being able to see both the exception text and the code that is faulty is very useful).

DanTup avatar Feb 06 '19 16:02 DanTup

This is still reproducible, removing "reproduce to verify" label

elliette avatar Nov 19 '24 22:11 elliette