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

ng test debug broken in v1.2.1 with vs code recipes configuration #7035

Closed
nwayve opened this issue Jul 18, 2017 · 3 comments
Closed

ng test debug broken in v1.2.1 with vs code recipes configuration #7035

nwayve opened this issue Jul 18, 2017 · 3 comments

Comments

@nwayve
Copy link

nwayve commented Jul 18, 2017

Bug Report or Feature Request (mark with an x)

- [x] bug report -> please search issues before submitting
- [ ] feature request

Versions.

@angular/cli: 1.2.1
node: 8.1.3
os: win32 x64
&&
@angular/cli: 1.1.1
node: 8.1.3
os: win32 x64

VS Code
Version 1.13.1

Repro steps.

ng new repro
cd repro
npm i -D @angular/[email protected]
// Follow steps for configuring debugging in vscode here: https://github.com/weinand/vscode-recipes/tree/master/Angular-CLI
// - Instructions do warn that this may not work with other 
npm t
// npm t => ng test
// Set a break point in app.component.spec.ts in one of the unit tests
// In vscode, debug "Launch Chrome with ng test"
// - should open Chrome to localhost:9876/debug.html
// - note that the breakpoint remains a red dot and is valid
// Click on link under 'AppComponent' for test where break point is set.
// Breakpoint should get hit as expected

npm i -D @angular/[email protected]
// - I think it actually breaks in 1.1.2 or 1.1.3
// - webpack gets bumped from 1.4.1 to 1.4.2
// Rerun instructions above from setting a breakpoint on down
// When debug is run in vscode, breakpoint turns from solid red dot to hollowed gray circle

Looking at the sources in the /debug.html page, the difference is the missing webpack source

The log given by the failure.

Breakpoint in vs code goes from a red dot to gray circle with the error:
"Breakpoint ignored because generated code not found (source map problem?)"

Desired functionality.

To be able to debug an angular project's unit tests setup with angular-cli >v1.1.1

Mention any other details that might be useful.

This may or may not be a bug, perse. ng-cli is most likely working as anticipated but due to changes in webpack, the location of source-map files (or configuration to output them to the browser) may need to be updated. Not sure what that configuration should look like though.

@filipesilva
Copy link
Contributor

Duplicate of #6583, this is fixed in earlier versions.

@filipesilva filipesilva marked this as a duplicate of #6583 Jul 28, 2017
@nwayve
Copy link
Author

nwayve commented Jul 30, 2017

Thanks for the reply to the existing issue. Wasn't able to find it initially.

@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Sep 7, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants