Bug 163197 - Web Inspector: Revealed line not highlighted in TextEditor while debugger paused
Summary: Web Inspector: Revealed line not highlighted in TextEditor while debugger paused
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Web Inspector (show other bugs)
Version: WebKit Nightly Build
Hardware: All All
: P2 Normal
Assignee: Matt Baker
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2016-10-10 00:03 PDT by Matt Baker
Modified: 2016-10-11 13:50 PDT (History)
7 users (show)

See Also:


Attachments
[Video] the bug (431.44 KB, video/mp4)
2016-10-10 00:03 PDT, Matt Baker
no flags Details
Patch (1.95 KB, patch)
2016-10-10 00:04 PDT, Matt Baker
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Matt Baker 2016-10-10 00:03:14 PDT
Created attachment 291067 [details]
[Video] the bug

Summary:
Revealed line not highlighted in TextEditor while debugger paused. The behavior was changed in https://bugs.webkit.org/show_bug.cgi?id=161658, to eliminate spamming highlight changes when the active call frame changes while debugging.

Instead of always preventing the revealed line from being highlighted whenever the debugger is paused, we should only do so if:

1. Paused in the debugger AND the line being revealed is equal to the executing line.
2. Paused in the debugger AND the executing line is falsey (this means the debugger is paused, and the execution location is being revealed but hasn't been set)

Steps to Reproduce:
1. Inspect:
<script>
(function () {
    function bar() {
        debugger;
    }

    function foo() {
        bar();
    }
    foo();
})();
</script>

2. Reload the page
3. When execution pauses, set a breakpoint somewhere other than the execution location
4. Click the breakpoint in the debugger sidebar
  => The line with the breakpoint isn't highlighted in the editor
Comment 1 Radar WebKit Bug Importer 2016-10-10 00:03:57 PDT
<rdar://problem/28690828>
Comment 2 Matt Baker 2016-10-10 00:04:59 PDT
Created attachment 291068 [details]
Patch
Comment 3 Timothy Hatcher 2016-10-10 10:01:33 PDT
Comment on attachment 291068 [details]
Patch

Good call!
Comment 4 WebKit Commit Bot 2016-10-10 10:25:41 PDT
Comment on attachment 291068 [details]
Patch

Clearing flags on attachment: 291068

Committed r207006: <http://trac.webkit.org/changeset/207006>
Comment 5 WebKit Commit Bot 2016-10-10 10:25:44 PDT
All reviewed patches have been landed.  Closing bug.
Comment 6 Joseph Pecoraro 2016-10-11 13:39:27 PDT
This makes stepping behavior look poor. While stepping the line highlights + fades blue despite it having the active line highlight already. This is likely because of the order of operations.
Comment 7 Joseph Pecoraro 2016-10-11 13:50:24 PDT
(In reply to comment #6)
> This makes stepping behavior look poor.

Addressing in bug 163294.