New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 676388 link

Starred by 6 users

Issue metadata

Status: Fixed
Owner:
Last visit > 30 days ago
Closed: Oct 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Windows
Pri: 2
Type: Bug



Sign in to add a comment

javascript breakpoint continues to move to another breakpoint position regardless of de-activating it.

Reported by williamh...@gmail.com, Dec 21 2016

Issue description

UserAgent: Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/54.0.2840.99 Safari/537.36

Steps to reproduce the problem:
1. Inspect element in a typescript function. Not sure how else to reproduce this issue for you. 
Attempting to attached a screenshot video so you can understand the behavior

What is the expected behavior?
when I click on a line number within a *.ts file I would expect it to put a breakpoint their as normal. 

What went wrong?
Instead it is not putting the breakpoint and re-establishing an old breakpoint somewhere else in the function that I had set previously. Even after eliminating the original breakpoint it keeps bringing back from the grave! ARGGG

Did this work before? N/A 

Chrome version: 54.0.2840.99  Channel: n/a
OS Version: 6.1 (Windows 7, Windows Server 2008 R2)
Flash Version: Shockwave Flash 23.0 r0

I captured the user behavior as a video using the Nimbus Chrome Extension
 
nimbus-record-video.webm
1.1 MB View Download
Labels: Needs-Milestone
Adding 'Needs-Milestone' label, TE will check the issue and update the bug with comments & tag with respective Mstone
Cc: krajshree@chromium.org
Labels: Needs-Feedback
williamhowley@ - Thanks for filing this issue...!!

Could you please provide a sample URL to test this issue.

This will help us in triaging the issue further.

Thanks...!!
Setup was local. I know in typescript, you are not able to inspect async
functions but this was a normal one. I'm not sure how you guys would debug
this :/ if I see it again I'll try and find more info on it.
Project Member

Comment 4 by sheriffbot@chromium.org, Dec 30 2016

Labels: -Needs-Feedback Needs-Review
Owner: krajshree@chromium.org
Thank you for providing more feedback. Adding requester "krajshree@chromium.org" for another review and adding "Needs-Review" label for tracking.

For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
Labels: -Needs-Review
Owner: ----
Cc: sureshkumari@chromium.org
Labels: Needs-Feedback
Reporter@ could you please provide a sample URL to test the issue.
It would help us in triaging the issue further.

Thanks..

Comment 7 by alph@chromium.org, Jan 9 2017

Cc: lushnikov@chromium.org
Components: -Platform>DevTools Platform>DevTools>JavaScript
Owner: kozyatinskiy@chromium.org
Status: Assigned (was: Unconfirmed)
Could be a source mapping issue. Could you please provide a source map file?
I'm not sure about this exact issue, but I have to say setting breakpoints now is a very random thing. some lines don't accept breakpoints (and they are not empty or var definitions etc.), sometimes they jump (one line, end of file or function), sometimes they are hidden (they break but no stars visible)
and now with 57 on mac they are shifted (the yellow marker is in the correct line but it looks like the previous line is the currently executing one)

I know I need to break this into different issues with more details but I just wanted to give feedback for the past months of using breakpoints (with and without source maps).


I just want a yellow marker where i click, nothing more, nothing less!
if I can't break on a line, gray it out and that's it.

I hope someone out there can make breakpoints great again :D
I have more information on this, or at least something similar. Consider the following Typescript program.

class Thing {
    key: Object;
}

class SomeClass {
    renderValue(value) { return value.hashCode.toString(); };

    onDestroy() {
        console.log('destroyed');
    }
}

Compile and serve this with sourcemaps and attempt to set a breakpoint on renderValue. It ends up setting it on the code line in onDestroy.

This is specific to the function being on a single line. What happens is that it ends up calling into uiLocationToRawLocation and that calls firstSourceLineMapping, passing only the line number. As a result it finds the first possible breakpoint on the line, which is the beginning of the function, and (hand-waving) the agent doesn't like that position and picks something else. Here's the stack trace getting to uiLocationToRawLocation, from Chrome 57.0.2987.133 on Mac.

uiLocationToRawLocation (inspector.js:formatted:36950)
_uiLocationToRawLocation (inspector.js:formatted:37968)
uiLocationToRawLocation (inspector.js:formatted:37843)
normalizeUILocation (inspector.js:formatted:37858)
setBreakpoint (inspector.js:formatted:38204)
_setBreakpoint (sources_module.js:532)
setBreakpoint (sources_module.js:527)
Promise.resolve (async)
checkNextLineIfNeeded (sources_module.js:524)
Promise.resolve (async)
checkErrorAndReturn (inspector.js:formatted:28033)
callback (inspector.js:formatted:19839)
dispatchResponse (inspector.js:formatted:19862)
_onMessage (inspector.js:formatted:19686)
_dispatchMessage (inspector.js:formatted:23134)
dispatchEventToListeners (inspector.js:formatted:5433)
innerDispatch (inspector.js:formatted:8260)
_dispatch (inspector.js:formatted:8256)
_dispatchOnInspectorFrontendAPI (devtools_compatibility.js:57)
dispatchMessage (devtools_compatibility.js:133)
(anonymous) (VM250:1)




I should add that I think this may be due to changes introduced in https://codereview.chromium.org/2484283004 , at least it's the thing that seems to have introduced some of the relevant code.
I also note that this is a regression, since the example works fine in Chromium 45.0.2454.104, which I happen to have handy.
Status: Fixed (was: Assigned)
I hope thins one will be fixed in next Canary release. Feel free to reopen it if it's still an issue.

Sign in to add a comment