Bug 158034 - Web Inspector: when paused due to "All Exceptions" breakpoint, there's no way to interact with an exception object originating from a native function
Summary: Web Inspector: when paused due to "All Exceptions" breakpoint, there's no way...
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: Web Inspector (show other bugs)
Version: WebKit Nightly Build
Hardware: All All
: P2 Normal
Assignee: Nobody
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2016-05-24 11:49 PDT by BJ Burg
Modified: 2016-12-13 15:37 PST (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description BJ Burg 2016-05-24 11:49:09 PDT
When paused due to "All Uncaught Exceptions", there is often a variable holding the exception, so it's possible to log that to console and poke at it.
However, for "All Exceptions", the debugger pauses at the call site and doesn't show the exception in the locals sidebar, a popover, or anywhere besides the Pause Reason text.

STEPS TO REPRODUCE:

0. Enable pause on "All Exceptions"
1. Type this in the console:

JSON.parse("}}")

EXPECTED:

It shows the Console Evaluation source. It also logs the exception to the console, or makes it appear in a popover next to the call site, or the Pause Reason text is clickable (to log to console).

ACTUAL:

Can't see anything!
Comment 1 BJ Burg 2016-05-24 11:49:46 PDT
Note: this is only really a problem for native functions that throw exceptions. If user code does it, the debugger will usually stop at the `throw` statement.
Comment 2 Joseph Pecoraro 2016-05-24 12:12:25 PDT
You can use $exception in the console to interact with the thrown or I caught error.
Comment 3 BJ Burg 2016-05-24 21:01:25 PDT
(In reply to comment #2)
> You can use $exception in the console to interact with the thrown or I
> caught error.

Maybe we should auto-log it with the '= $exception' to make this more obvious.
Comment 4 BJ Burg 2016-05-27 07:18:11 PDT
Ping for import.
Comment 5 Alexey Proskuryakov 2016-09-08 13:57:09 PDT
<rdar://problem/28213526>