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

Source map problems since [email protected] #6623

Closed
mm-q opened this issue Jun 9, 2017 · 10 comments
Closed

Source map problems since [email protected] #6623

mm-q opened this issue Jun 9, 2017 · 10 comments
Assignees
Labels
P3 An issue that is relevant to core functions, but does not impede progress. Important, but not urgent severity3: broken

Comments

@mm-q
Copy link

mm-q commented Jun 9, 2017

Bug Report or Feature Request (mark with an x)

- [ X ] bug report
- [ ] feature request

Versions.

@angular/cli: 1.1.1
node: 6.10.2
os: win32 x64
@angular/animations: 4.1.3
@angular/common: 4.1.3
@angular/compiler: 4.1.3
@angular/core: 4.1.3
@angular/forms: 4.1.3
@angular/http: 4.1.3
@angular/platform-browser: 4.1.3
@angular/platform-browser-dynamic: 4.1.3
@angular/router: 4.1.3
@angular/cli: 1.1.1
@angular/compiler-cli: 4.1.3
@angular/language-service: 4.1.3

Visual Studio Code: 1.13.0
Debugger for Chrome: 3.1.2

Repro steps.

I have been successfully using Visual Studio Code with the extension Debugger for Chrome to debug my Angular project whilst using ng serve. Ever since I have bumped angular-cli to v1.1.1, I have noticed that the debugging stopped working. It used to work a week ago when the project was on v.1.1.0, suddenly not.

Breakpoints are ignored because generated code not found (source map problems?)

Can somebody help me pinpoint the reason for that? Included the debugger's trace log.

The log given by the failure.

vscode-chrome-debug.txt

Mention any other details that might be useful.

package.json
"dependencies": { "@angular/animations": "^4.0.0", "@angular/common": "^4.0.0", "@angular/compiler": "^4.0.0", "@angular/core": "^4.0.0", "@angular/forms": "^4.0.0", "@angular/http": "^4.0.0", "@angular/platform-browser": "^4.0.0", "@angular/platform-browser-dynamic": "^4.0.0", "@angular/router": "^4.0.0", "@ngx-meta/core": "^0.4.0-rc.2", "@ngx-translate/core": "^6.0.1", "@ngx-translate/http-loader": "^0.0.3", "@types/decimal.js": "^0.0.30", "@types/nprogress": "^0.0.29", "@types/sprintf-js": "0.0.27", "algoliasearch": "^3.22.3", "algoliasearch-helper": "^2.20.1", "angular2-materialize": "^15.0.4", "core-js": "^2.4.1", "decimal.js": "^7.1.0", "ion-rangeslider": "^2.1.4", "jquery": "^2.2.4", "materialize-css": "^0.98.2", "ngx-cookie-service": "^1.0.7", "ngx-infinite-scroll": "^0.5.1", "nprogress": "^0.2.0", "rxjs": "^5.1.0", "sprintf-js": "^1.1.1", "zone.js": "^0.8.4" }, "devDependencies": { "@angular/cli": "~1.1.1", "@angular/compiler-cli": "^4.0.0", "@angular/language-service": "^4.0.0", "@types/jasmine": "2.5.45", "@types/node": "~6.0.60", "codelyzer": "~3.0.1", "jasmine-core": "~2.6.2", "jasmine-spec-reporter": "~4.1.0", "karma": "~1.7.0", "karma-chrome-launcher": "~2.1.1", "karma-cli": "~1.0.1", "karma-jasmine": "~1.1.0", "karma-jasmine-html-reporter": "^0.2.2", "karma-coverage-istanbul-reporter": "^1.2.1", "protractor": "~5.1.2", "ts-node": "~3.0.4", "tslint": "~5.3.2", "typescript": "~2.3.3" }

launch.json
{ "version": "0.2.0", "configurations": [ { "type": "chrome", "request": "launch", "name": "Launch Chrome", "url": "http://localhost:4200", "webRoot": "${workspaceRoot}" } ] }

tsconfig.json
{ "compileOnSave": false, "compilerOptions": { "outDir": "./dist/out-tsc", "baseUrl": "src", "sourceMap": true, "declaration": false, "moduleResolution": "node", "emitDecoratorMetadata": true, "experimentalDecorators": true, "target": "es5", "typeRoots": [ "node_modules/@types" ], "lib": [ "es2016", "dom" ] } }

@mm-q mm-q changed the title Source map problem since [email protected] Source map problems since [email protected] Jun 9, 2017
@latchuk
Copy link

latchuk commented Jun 12, 2017

Same problem here. I'm back to angular cli version 1.0.3 and chrome debugger is working now. I'm waiting for answers here before use the new version again.

@sebasfiorent
Copy link

Same here. Using 1.0.6 works ok

@LuckyMallari
Copy link

LuckyMallari commented Jun 13, 2017

Not a bug:
Here's what works with me for 1.1.1:

launch.json

      "sourceMapPathOverrides": {
        "webpack:///C:*": "C:/*"
      }

@Brocco
Copy link
Contributor

Brocco commented Jun 13, 2017

@mm-q @sebasfiorent Can you confirm whether the solution provided by @LuckyMallari is working for you?

@Brocco Brocco self-assigned this Jun 13, 2017
@Brocco Brocco added P3 An issue that is relevant to core functions, but does not impede progress. Important, but not urgent severity3: broken labels Jun 13, 2017
@mm-q
Copy link
Author

mm-q commented Jun 13, 2017

@Brocco It does.

@Brocco Brocco closed this as completed Jun 14, 2017
@latchuk
Copy link

latchuk commented Jun 14, 2017

Thank you so much LuckyMallari. Now my debug is working with the Angular Cli 1.1.1

@clydin
Copy link
Member

clydin commented Jun 14, 2017

Note for non windows platforms you'll want to remove the drive letter:

            "sourceMapPathOverrides": {
                "webpack:///*": "/*"
            }

@clydin
Copy link
Member

clydin commented Jun 14, 2017

It looks like there were some sourcemap source path issues when used with chrome. This PR should solve that and remove the need to manually override the paths. It also allows the source files to be found from within Chrome directly.

@bbaia
Copy link
Contributor

bbaia commented Jun 20, 2017

The problem remains when debugging through Docker using ng serve --host 0.0.0.0.

@angular/cli: 1.1.2
node: 6.10.3
os: linux x64
@angular/animations: 4.2.3
@angular/common: 4.2.3
@angular/compiler: 4.2.3
@angular/core: 4.2.3
@angular/forms: 4.2.3
@angular/http: 4.2.3
@angular/platform-browser: 4.2.3
@angular/platform-browser-dynamic: 4.2.3
@angular/router: 4.2.3
@angular/cli: 1.1.2
@angular/compiler-cli: 4.2.3
@angular/language-service: 4.2.3

launch.json configuratin file:

{
  "type": "chrome",
  "request": "launch",
  "name": "Client with Chrome",
  "url": "http://localhost:4200",
  "webRoot": "${workspaceRoot}"
}

@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
P3 An issue that is relevant to core functions, but does not impede progress. Important, but not urgent severity3: broken
Projects
None yet
Development

No branches or pull requests

7 participants