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

Issue 834505 link

Starred by 2 users

Issue metadata

Status: WontFix
Owner:
Closed: Sep 25
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Mac
Pri: 2
Type: Bug-Regression



Sign in to add a comment

Cannot set breakpoint on an if statement in TypeScript sources

Reported by em...@nickbedford.com, Apr 18 2018

Issue description

UserAgent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/66.0.3359.117 Safari/537.36

Steps to reproduce the problem:
1. Open Developer Tools on the Sources tab. 
2. Find the TypeScript (source mapped) if-statement you want break on and debug.
3. Try to set the breakpoint on the line of the if-statement.

What is the expected behavior?
The breakpoint should be set on the if-statement, allowing debugging before the conditions are evaluated.

What went wrong?
The breakpoint is moved down to the next available line, such as the code executed inside the conditional block, or the next non-if statement.

This means it is impossible to properly debug TypeScript sources with this regression.

Did this work before? Yes Unsure, probably 57 or 58

Chrome version: 66.0.3359.117  Channel: stable
OS Version: OS X 10.12.6
Flash Version: N/A

I predominantly develop in TypeScript and transpile to JS with source maps and this regression in the debugger has made it very difficult to debug code in many circumstances.
 
setting-breakpoints-in-typescript-sources.mp4
414 KB View Download
I mention versions 57 or 58, I meant an earlier 60's version.
Labels: Needs-Bisect Needs-Triage-M66
Cc: sindhu.chelamcherla@chromium.org
Labels: Triaged-ET Needs-Feedback
Unable to reproduce this issue on 66.0.3359.117 with below mentioned steps. Attaching screencast for reference.

1. Opened devtools sources tab
2. Selected one of thr .js file which has if functions and enabled breakpoint for if statements -- observed successful enabling of breakpoints.

@Reporter: Please check the video and let us know if we miss anything. Please provide a sample file on which you are seeing this issue. This would help in further debugging of the issue.

Thanks!
834505.mp4
6.1 MB View Download
sindhu.chelamcherla@chromium.org: This applies to Typescript source debugging, not JavaScript.

By the way, I am compiling Typescript with source maps from within PhpStorm.
Project Member

Comment 5 by sheriffbot@chromium.org, Apr 19 2018

Labels: -Needs-Feedback
Thank you for providing more feedback. Adding the requester to the cc list.

For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
Labels: TE-NeedsTriageHelp
This issue seems to be out of TE scope as this requires compiling of typescript with php. Hence adding TE-NeedsTriageHelp label. Could someone from devtools team please have a look at this issue.

Thanks!
Owner: kozy@chromium.org
Status: Assigned (was: Unconfirmed)
I'm having this issue in chrome 64 running on linux.
If I attempt to set a breakpoint on an if statement in a mapped .tsx/.ts file it places the breakpoint on the line after the if statement.
I am able to succesfully get a breakpoint set on the if statement if I open the .js file that the .ts is mapped from and put the breakpoint on the if statement in that .js file.

This used to work in a prior version of Chrome
Status: WontFix (was: Assigned)
Thanks for your report.
Couple of Source Map related issues were fixed recently, please check latest Google Chrome Canary. If this issue is still reproducible please file another issue and provide some sample page.

Sign in to add a comment