Closed amreladawy closed 6 years ago
Can you provide a sample project to reproduce the issue?
Thanks, Dan
Hi Dan, Thanks for the prompt response. here is what I tried.
ionic start test tabs
cd test
ionic g page test
Then edit the test.ts
as following:
import { Component } from '@angular/core';
import { IonicPage, NavController, NavParams } from 'ionic-angular';
/**
* Generated class for the TestPage page.
*
* See https://ionicframework.com/docs/components/#navigation for more info on
* Ionic pages and navigation.
*/
@IonicPage({
name: "test",
segment: "test"
}) @Component({
selector: 'page-test',
templateUrl: 'test.html',
})
export class TestPage {
constructor(public navCtrl: NavController, public navParams: NavParams) {
}
ionViewDidLoad() {
console.log('ionViewDidLoad TestPage');
console.log("Line26")
console.log("Line27")
console.log("Line28")
console.log("Line29")
console.log("Line30")
console.log("Line33")
console.log("Line34")
console.log("Line35")
console.log("Line36")
console.log("Line39")
console.log("Line40")
console.log("Line41")
console.log("Line42")
}
}
The log statements match the line number in the test.ts
file.
running the app will show the following
Inspecting the source code shows the following
Please note that the line number showed next to the statement is correct, however, if you set a breakpoint next to line 26, for example, it is in fact at line 29 where lines 26,27,28 are executed before hitting the breakpoint.
You may also notice how the line numbers on the side of the source files are active and inactive according to a shifted basis.
Can you try, add lines in file package.json
"config": {
"ionic_bundler": "webpack",
"ionic_source_map_type": "eval"
}
Hi, I tried what you suggested, and the src folder disappeared from chrome. also, lines are shifted by two lines .
I'm also seeing the same behaviour as @amreladawy
This is fixed in the 3.1.5
release.
Thanks, Dan
Here is the change
https://github.com/ionic-team/ionic-app-scripts/commit/a5df139
Hi Dan,
I still see this issue again on my current project event after updating to latest app-scripts. It is not happening when starting a new project.
Hi Dan, I still have the same issue. Should I do anything?
same here with ionic 3.19.1
Also seeing with ionic 3.9.2
No success after updating to the latest version: ionic/app-scripts: 3.1.9 Debugging is unusable :(
Using action script 3.1.8 Ionic 3.19.1
This issue still persists. There is a difference of two lines in the Chrome debugger. All imports are done in the same line (no breaking up imports across several lines).
Why is this issue closed? Did someone find a solution?
same issue here. There is any help ?
Hi! I was facing the same problem. To solve this issue make sure that:
Do:
import { ChangeDetectorRef, Component, Injector, ViewChild, ElementRef } from '@angular/core';
Avoid:
import {
ChangeDetectorRef,
Component,
Injector,
ViewChild,
ElementRef
} from '@angular/core';
Do:
@IonicPage({name: 'TestPage', segment: 'test-page'})
Avoid:
@IonicPage({
name: 'TestPage,
segment: 'test-page'
})
Why? I don´t know, but worked for me! :D
@pcsantana I guess I'm disabling "max-line-length" in tslint then if this works!
I'm experiencing this on 3.2.0. Is there any fix for this apart from moving imports and decorators onto one line?
Same issue in "@ionic/angular": "4.0.0-beta.12"
-- presumably using faulty webpack source mapper, but I have no idea where that is configured....
Short description of the problem:
Some of the components are mapped to wrong line numbers. That is making dubbing on chrome very difficult.
Some of the classes are correctly mapped to original line numbers, some are not. There is always a shift but in a variable number of lines.
What behavior are you expecting?
The source mapped files should match the original *.ts files.
Which @ionic/app-scripts version are you using?
@ionic/cli-utils
:1.18.0
ionic (Ionic CLI)
:3.18.0
global packages:
local packages:
System:
Other information: (e.g. stacktraces, related issues, suggestions how to fix, stackoverflow links, forum links, etc)
There was a reported issue on angular that is closed. https://github.com/angular/angular-cli/issues/2811