Created attachment 281400 [details] Bad anonymous scripts This seems to be a regression from Safari 9.x. STEPS TO REPRODUCE: 1. set a breakpoint with invalid JS 2. make the breakpoint's line execute EXPECTED: No anonymous script is added to the debugger tab's sidebar. ACTUAL: An anonymous script is created per breakpoint, but reused across failed condition evaluations. See attached screenshot. NOTES: In both cases, and in shipped Safari, the syntax error appears in the console with a link to the breakpoint's file/line/column.
<rdar://problem/26825020>
For comparison, Chrome and Edge show nothing when a condition contains an error. FireFox shows an error message beneath the breakpoint itself.
Regressed in https://trac.webkit.org/changeset/200064.
Created attachment 281500 [details] [Patch] Proposed Fix
Comment on attachment 281500 [details] [Patch] Proposed Fix Attachment 281500 [details] did not pass mac-debug-ews (mac): Output: http://webkit-queues.webkit.org/results/1514980 New failing tests: inspector/model/stack-trace.html
Created attachment 281508 [details] Archive of layout-test-results from ews117 for mac-yosemite The attached test failures were seen while running run-webkit-tests on the mac-debug-ews. Bot: ews117 Port: mac-yosemite Platform: Mac OS X 10.10.5
Comment on attachment 281500 [details] [Patch] Proposed Fix Attachment 281500 [details] did not pass mac-ews (mac): Output: http://webkit-queues.webkit.org/results/1515041 New failing tests: inspector/model/stack-trace.html
Created attachment 281509 [details] Archive of layout-test-results from ews103 for mac-yosemite The attached test failures were seen while running run-webkit-tests on the mac-ews. Bot: ews103 Port: mac-yosemite Platform: Mac OS X 10.10.5
Comment on attachment 281500 [details] [Patch] Proposed Fix Attachment 281500 [details] did not pass mac-wk2-ews (mac-wk2): Output: http://webkit-queues.webkit.org/results/1515097 New failing tests: inspector/model/stack-trace.html
Created attachment 281511 [details] Archive of layout-test-results from ews104 for mac-yosemite-wk2 The attached test failures were seen while running run-webkit-tests on the mac-wk2-ews. Bot: ews104 Port: mac-yosemite-wk2 Platform: Mac OS X 10.10.5
Comment on attachment 281500 [details] [Patch] Proposed Fix I think we wanted to take a different approach here. Show anonymous scripts sometimes.
(In reply to comment #11) > Comment on attachment 281500 [details] > [Patch] Proposed Fix > > I think we wanted to take a different approach here. Show anonymous scripts > sometimes. Instead of exposing breakpoint implementation details (the anonymous script item), we should associate the error with the breakpoint, and display an error message widget on the breakpoint's line. Clicking an entry for a breakpoint script error in the Console should highlight the source code location of the breakpoint.
Created attachment 301244 [details] [Image] Proposed UI