microsoft / microsoft/vscode-js-debug
Breakpoints not binding in VS Code debugger with inline source maps from Angular's esbuild builder
@connor4312 is already working on this.
Since Dec 19, 2025.
- Dominant language
- TypeScript
- Stars
- 2k
- Forks
- 373
- Avg merge
- 1d 9m
- Merged PRs (30d)
- 6
Description
Describe the bug
When using Angular's @angular-devkit/build-angular:browser-esbuild builder (default in recent Angular versions), source maps are always generated inline. This causes breakpoints set in original TypeScript files to not bind correctly in the VS Code JavaScript Debugger (built-in Chrome/Edge debugger). However, the same inline source maps work perfectly when debugging directly in Chrome DevTools (F12).
This is a limitation specific to VS Code's handling of inline source maps from esbuild, as switching back to the webpack builder (@angular-devkit/build-angular:browser) resolves the issue but sacrifices build speed.
To Reproduce
- Create a new Angular project: ng new test-app --ssr=false.
- Ensure the builder is set to esbuild in angular.json (default in Angular 17+).
- Add a simple component or edit app.component.ts with a method where you can set a breakpoint (e.g., in ngOnInit).
- Serve the app: ng serve.
- In VS Code, use a standard launch.json configuration to attach the Chrome debugger (e.g., { "type": "chrome", "request": "launch", "name": "Launch Chrome against localhost", "url": "http://localhost:4200", "webRoot": "${workspaceFolder}" }).
- Set a breakpoint in the TS file and trigger it—the debugger skips or doesn't hit the breakpoint in the source-mapped file.
- Open the same app in Chrome DevTools directly—breakpoints work as expected.
Log File
Emailed to connor@xbox.com
VS Code Version:
1.107.0
Additional context
This is a large Angular app just migrated to ESBuild. Previously, with webpack, everything worked fine debugging through VSCode.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.