Ionic debugging


#21

Check out the app-scripts README.


#22

All works fine for me with the last version:

ionic 2.0.0-rc.4
ionic/app-scripts 0.0.47

npm install ionic-angular@latest --save
npm install @ionic/app-scripts@latest --save-dev


#23

Hi guys , i am trying to debug my application… I am using ionic serve with chromeDev tools… however, I have a component that lists Contacts from the phone… this can’t obviously work on Chrome… So, What should I use in order to run and see the console.log outputs… I am struggling to display phoneNumbers at the moment… and stuck becuz i cannot debug properly

someone advice, thanx


#24

Is webpack the default bundler in ionic 2.2.0 ?
I really don’t understand how to debug typescript for now. (I am using Ubuntu, Sublime Text, and Chrome).
What’s the simplest way to go ?


#25

Yes.

[quote=“LouisR, post:24, topic:46672”]
I really don’t understand how to debug typescript for now. […] What’s the simplest way to go ?[/quote]

Chrome’s developer tools work great for me.


#26

thanks for your answer @rapropos.


#27

Hi Can anybody find solution to debug (TS) file in real device ???


#28

If it’s an Android device you could just add a homescreen link and forget the app.


#29

Thanks @Judgewest2000 for replying

Can u please explain ???


#30

Run ionic serve.
On your android device launch chrome and browse to the IP address as stated on the console.

Then click tools, add to home screen.

You can test all your code apart from plugins


#31

thanku very much for your answer and your time @Judgewest2000.

But what happen when i launch my app on real device like my android device .when i try to inspect that app in chrome i not able to find ts(type script) file .Please find the screen short for your reference.

if u have any solution please help me out.


#32

You need to enable remote debugging - it’s not that hard.


#33

Also incidentally in the same fashion - this is the future of web delivered apps - PWA’s.

As soon as Apple pull their finger out and support service workers I’m jumping ship for like 85% of my stuff.


#34

@Judgewest2000

Actually my remote debugging is already enable i am able to debug html (like able to change css ) but when i try to debug ts file(type script) i not able to see ts file to debug in ionic 2.


#35

I think I just live with that (probably can be fixed but I’ve never bothered). Tend to add the debugger; statement where I want to debug and let it hit.

The debug version of javascript is not a million miles away from the original typescript.


#36

best way to debug TS file in a new version of ionic follow instruction
http://blog.ionic.io/improvements-to-ionic-build-process/