Skip to content

@angular/build 20.1.0 totally breaks console logs line numbers in browser devtools #30731

@rostislavcz

Description

@rostislavcz

Command

serve

Is this a regression?

  • Yes, this behavior used to work in the previous version

The previous version in which this bug was not present was

No response

Description

Hello,

after upgrading to minor version of @angular/build, whenever in my app I use console.log, in console it shows totally random line of code, for example i put console.log in my main.ts file on line 6 and in chrome devtool console, there is line 15 for example, before I used 20.0.3 version and that worked totally fine. Sometimes also happens that certain console logs are in console written as totally another file, for example I console.log something in my Directive1 and inside console log is shown in Directive2 on different line.

Took me several hours before i found that problem is definitely somewhere inside minor update of @angular/build/....

downgrade to @angular/[email protected] works as expected

Minimal Reproduction

just run any angular project with several services and you will see, that if you console.log in some service, lets say in constructor, in devtool console, you will see different line or even file

Exception or Error


Your Environment

@angular-devkit/architect    0.2001.1
@angular-devkit/core         20.1.1
@angular-devkit/schematics   20.1.1
@angular/build               20.1.1
@angular/cdk                 20.1.2
@angular/google-maps         20.1.2
@angular/material            20.1.2
@schematics/angular          20.1.1
rxjs                         7.8.2
typescript                   5.8.3
zone.js                      0.15.1

Anything else relevant?

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    needs: repro stepsWe cannot reproduce the issue with the information given

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions