New issue
Advanced search Search tips

Issue 730177 link

Starred by 2 users

Issue metadata

Status: Fixed
Owner:
Closed: Oct 2017
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux
Pri: 2
Type: Bug



Sign in to add a comment

Breakpoint in last line wraps around to first statement

Reported by account-...@dlehmann.eu, Jun 6 2017

Issue description

UserAgent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:53.0) Gecko/20100101 Firefox/53.0

Steps to reproduce the problem:
1. Open example.html in Chromium 58
2. Open DevTools > Debugger
3. Set breakpoint in line 12 (where closing script tag is)
4. Reload

What is the expected behavior?
- Two possiblities: 
a) Breakpoint should stay at line 12 and be hit at the very end of script execution.
b) It should not be possible to set breakpoint there, since there is no statement/meaningful code at this line anyway.

What went wrong?
- After reload breakpoint is moved to line 6 (at the beginning of script) and is hit, i.e., execution pauses at the first statement.
- See attached screencapture for demonstration.

Did this work before? N/A 

Chrome version: 58.0.3029.110 (Developer Build) Built on Ubuntu  Channel: n/a
OS Version: Ubuntu 16.10 (64-bit)
Flash Version: Shockwave Flash 25.0 r0

- Wrapping around of the breakpoint to the beginning is only triggered when line 12 is NOT indented, i.e., when there is no whitespace before the closing </script> tag.
- Adding whitespace (for example one space) to the beginning of line 12 fixes the problem: The breakpoint is not moved to the beginning of the script and it is hit at the very end of the execution of the script.
 
example.html
419 bytes View Download
screencapture.ogv
493 KB View Download
Labels: Needs-Triage-M58
A more realistic scenario for this to happen is when the script is not inline, but a JavaScript file. If the last line of that file is empty and one sets a breakpoint there, it also wraps around to the beginning of the file.
Components: -Platform>DevTools Platform>DevTools>JavaScript
Owner: kozyatinskiy@chromium.org
Status: Assigned (was: Unconfirmed)
Status: Fixed (was: Assigned)
Should be fixed in one of the Canary releases next week.
Project Member

Comment 6 by bugdroid1@chromium.org, Oct 14 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/v8/v8.git/+/f485f44ad9771846f88b7fa6418ce0b13f7d3862

commit f485f44ad9771846f88b7fa6418ce0b13f7d3862
Author: Michael Achenbach <machenbach@chromium.org>
Date: Sat Oct 14 10:53:30 2017

Revert "[inspector] breakpoint after last break position should not jump to first line"

This reverts commit 61292f0b60a73c37a096b603aff292f3c58ac4fd.

Reason for revert: Breaks layout tests:
https://build.chromium.org/p/client.v8.fyi/builders/V8-Blink%20Linux%2064/builds/18913

Original change's description:
> [inspector] breakpoint after last break position should not jump to first line
> 
> R=‚Äčjgruber@chromium.org
> 
> Bug:  chromium:730177 
> Change-Id: I0f3666a333604cb80bb51410c5edf2aceb0c6ef5
> Reviewed-on: https://chromium-review.googlesource.com/717717
> Commit-Queue: Aleksey Kozyatinskiy <kozyatinskiy@chromium.org>
> Reviewed-by: Jakob Gruber <jgruber@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#48556}

TBR=kozyatinskiy@chromium.org,jgruber@chromium.org

Change-Id: Ic4e961bf9c82e43281779c79e22660a55bfcb29d
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug:  chromium:730177 
Reviewed-on: https://chromium-review.googlesource.com/720376
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/master@{#48567}
[modify] https://crrev.com/f485f44ad9771846f88b7fa6418ce0b13f7d3862/src/debug/debug.cc
[modify] https://crrev.com/f485f44ad9771846f88b7fa6418ce0b13f7d3862/test/debugger/debug/regress/regress-crbug-517592.js
[delete] https://crrev.com/041de0aa1a0b70d25d4620fa59f4f9b3c816685d/test/inspector/debugger/set-breakpoint-at-last-line-expected.txt
[delete] https://crrev.com/041de0aa1a0b70d25d4620fa59f4f9b3c816685d/test/inspector/debugger/set-breakpoint-at-last-line.js

Status: Assigned (was: Fixed)
Owner: kozy@chromium.org
Project Member

Comment 9 by bugdroid1@chromium.org, Oct 16 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/v8/v8.git/+/b1827e9bc351dcdc7c73d5f7ae4f2e02df069bb0

commit b1827e9bc351dcdc7c73d5f7ae4f2e02df069bb0
Author: Alexey Kozyatinskiy <kozyatinskiy@chromium.org>
Date: Mon Oct 16 22:04:55 2017

Reland "[inspector] breakpoint after last break position should not jump to first line"

This is a reland of 61292f0b60a73c37a096b603aff292f3c58ac4fd
Original change's description:
> [inspector] breakpoint after last break position should not jump to first line
> 
> R=jgruber@chromium.org
> 
> Bug:  chromium:730177 
> Change-Id: I0f3666a333604cb80bb51410c5edf2aceb0c6ef5
> Reviewed-on: https://chromium-review.googlesource.com/717717
> Commit-Queue: Aleksey Kozyatinskiy <kozyatinskiy@chromium.org>
> Reviewed-by: Jakob Gruber <jgruber@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#48556}

TBR=jgruber@chromium.org

Bug:  chromium:730177 
Change-Id: I564cc5d7778f9d79780eae9dbe2d9aafaad4f466
Reviewed-on: https://chromium-review.googlesource.com/721468
Commit-Queue: Aleksey Kozyatinskiy <kozyatinskiy@chromium.org>
Reviewed-by: Aleksey Kozyatinskiy <kozyatinskiy@chromium.org>
Cr-Commit-Position: refs/heads/master@{#48615}
[modify] https://crrev.com/b1827e9bc351dcdc7c73d5f7ae4f2e02df069bb0/src/debug/debug.cc
[modify] https://crrev.com/b1827e9bc351dcdc7c73d5f7ae4f2e02df069bb0/test/debugger/debug/regress/regress-crbug-517592.js
[add] https://crrev.com/b1827e9bc351dcdc7c73d5f7ae4f2e02df069bb0/test/inspector/debugger/set-breakpoint-at-last-line-expected.txt
[add] https://crrev.com/b1827e9bc351dcdc7c73d5f7ae4f2e02df069bb0/test/inspector/debugger/set-breakpoint-at-last-line.js

Comment 10 by kozy@chromium.org, Oct 19 2017

Status: Fixed (was: Assigned)

Sign in to add a comment