Bug 138363 - Web Inspector: When pausing on exception from console we should show the source and call frames
Summary: Web Inspector: When pausing on exception from console we should show the sour...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Web Inspector (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Normal
Assignee: Nobody
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2014-11-04 11:21 PST by Joseph Pecoraro
Modified: 2016-05-02 21:46 PDT (History)
5 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Joseph Pecoraro 2014-11-04 11:21:27 PST
* SUMMARY
Should show source code and call frames for exceptions triggered by console/eval evaluations.

* STEPS TO REPRODUCE
1. Inspect any page.
2. Enable Pause on all exceptions
3. js> setTimeout(function(){[].x.x})
4. When paused, hover over any JavaScript, e.g. "document" in the index.html
  => Exception, no Call Frames, no Source with the exception

* NOTES
Normally we disallow showing __WebInspectorConsole__ sources, but I think we should show it here.
Comment 1 Radar WebKit Bug Importer 2014-11-04 11:21:54 PST
<rdar://problem/18869487>
Comment 2 Joseph Pecoraro 2014-11-04 11:24:18 PST
Maybe we should do this if there is a __WebInspectorConsole__ in the call frames, but not if there are __WebInspectorInjectedScript__, which should be internal only.

In fact, I think we had a workaround in the frontend to auto-continue in those cases, which we should add back.

See related:
<https://webkit.org/b/138341> Web Inspector: Inspector pauses 3 times when evaluating window.decodeURI('%%%')
Comment 3 Timothy Hatcher 2014-11-04 14:31:28 PST
The idea of not pausing for exceptions from the console is to make the REPL be very friendly to errors. You should see the exception Error logged as the result. For timeouts, that is tricky and likely an edge case.

I don't want to make the common case of getting an immediate exception cause the debugger to pause in a __WebInspectorConsole__ source resource.
Comment 4 Joseph Pecoraro 2016-05-02 18:51:06 PDT
Tim, I think you effectively fixed this by showing the Console Evaluation script.
Comment 5 Timothy Hatcher 2016-05-02 21:46:31 PDT
Yep.