You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Yes, this behavior used to work in the previous version
The previous version in which this bug was not present was
Node 16 LTS
Description
When using Node 18 (LTS), a newly created project cannot hit any breakpoints (greyed out). The debugger gets attached correctly, but in VSCode no breakpoints are active. When downgrading to Node 16 (LTS), everything works out of the box as it should be.
You can make Node 18 work by adding --host=127.0.0.1 to the ng serve command. Then breakpoints get hit. I feel, one should not need to do this on newly creatd projects with the CLI.
Does not seem to be an issue directly with the CLI but maybe dev-server or Node itself, but it definitely affects CLI and the default projects are therefor broken (cannot be debugged).
Minimal Reproduction
Not working:
ng new BreakTest (no routing, SCSS styles)
Add breakpoint in app.component.ts line 9 (or any other valid line in any source file)
Start debugging in Chrome
Working:
ng new BreakTest (no routing, SCSS styles)
Add breakpoint in app.component.ts line 9 (or any other valid line in any source file)
In package.json add --host=127.0.0.1 to ng serve command
Start debugging in Chrome
Exception or Error
All breakpoints are greyed out and do not get hit with Node 18
Node.js 18 no longer prefers IPv4 over IPV6 Instead, it will now respect the order that is returned based on the dns entries. This means that it's not guaranteed that localhost is resolved to 127.0.0.1. See: nodejs/node#39987
Command
serve
Is this a regression?
The previous version in which this bug was not present was
Node 16 LTS
Description
When using Node 18 (LTS), a newly created project cannot hit any breakpoints (greyed out). The debugger gets attached correctly, but in VSCode no breakpoints are active. When downgrading to Node 16 (LTS), everything works out of the box as it should be.
You can make Node 18 work by adding
--host=127.0.0.1
to theng serve
command. Then breakpoints get hit. I feel, one should not need to do this on newly creatd projects with the CLI.Does not seem to be an issue directly with the CLI but maybe dev-server or Node itself, but it definitely affects CLI and the default projects are therefor broken (cannot be debugged).
Minimal Reproduction
Not working:
ng new BreakTest
(no routing, SCSS styles)app.component.ts
line 9 (or any other valid line in any source file)Working:
ng new BreakTest
(no routing, SCSS styles)app.component.ts
line 9 (or any other valid line in any source file)package.json
add--host=127.0.0.1
tong serve
commandException or Error
Your Environment
Anything else relevant?
Potentially related issues:
#24442
#23383
The text was updated successfully, but these errors were encountered: