Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to debug library in VS Code since 19.2.0 #29764

Open
1 task done
acohenOT opened this issue Mar 6, 2025 · 1 comment
Open
1 task done

Unable to debug library in VS Code since 19.2.0 #29764

acohenOT opened this issue Mar 6, 2025 · 1 comment

Comments

@acohenOT
Copy link
Contributor

acohenOT commented Mar 6, 2025

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

19.1.9

Description

With angular-cli 19.2.0, you can no longer debug libraries using Visual Studio Code.

Minimal Reproduction

git clone https://github.com/acohenOT/angular191.git
cd angular191
npm install
ng build viewer --configuration development   # this builds the library `viewer`
code .    # open project in VS Code

Add breakpoint in library component constructor

Image

Select Run > Start Debugging

Image

Open http://localhost:4200/viewer which loads the library component

Image

Exception or Error


Your Environment

ng version

     _                      _                 ____ _     ___
    / \   _ __   __ _ _   _| | __ _ _ __     / ___| |   |_ _|
   / △ \ | '_ \ / _` | | | | |/ _` | '__|   | |   | |    | |
  / ___ \| | | | (_| | |_| | | (_| | |      | |___| |___ | |
 /_/   \_\_| |_|\__, |\__,_|_|\__,_|_|       \____|_____|___|
                |___/
    

Angular CLI: 19.2.0
Node: 22.14.0
Package Manager: npm 11.2.0
OS: win32 x64

Angular: 19.2.1
... common, compiler, compiler-cli, core, forms
... platform-browser, platform-browser-dynamic, router

Package                         Version
---------------------------------------------------------
@angular-devkit/architect       0.1902.0
@angular-devkit/build-angular   19.2.0
@angular-devkit/core            19.2.0
@angular-devkit/schematics      19.2.0
@angular/cli                    19.2.0
@schematics/angular             19.2.0
ng-packagr                      19.2.0
rxjs                            7.8.2
typescript                      5.7.3
zone.js                         0.15.0

Anything else relevant?

In package.json change cli dependencies to 19.1.9 and run npm install, then the steps above work and the breakpoint is hit.

    "@angular-devkit/build-angular": "19.1.9",
    "@angular/cli": "19.1.9",
@alan-agius4
Copy link
Collaborator

Thanks for opening this issue, I have looked into this and it appears that is cause by a bug in esbuild.
See: evanw/esbuild#4105

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants