ionic-team / ionic-framework

A powerful cross-platform UI toolkit for building native-quality iOS, Android, and Progressive Web Apps with HTML, CSS, and JavaScript.
https://ionicframework.com
MIT License
51.02k stars 13.52k forks source link

Debugging app in Safari #6878

Closed galsch closed 8 years ago

galsch commented 8 years ago

Hi,

I'm using the sample Ionic 2 app from (http://ionicframework.com/docs/v2/getting-started/installation/)

Following the instruction I was able to run the app. However, I'm unable to debug the app in Safari with source maps. In Chrome it works perfectly. I'm using OS X with Safari 9.

Adding screenshots of Chrome and Safari.

In Chrome we can see source maps files: screen shot 2016-06-13 at 12 18 17 pm

In safari we don't se source maps files only the bundled files:

screen shot 2016-06-13 at 12 18 52 pm

Can we debug ionic apps with source maps in Safari or we must use Chrome? In my iOS Apps I must debug with Safari, so it's really important to have this ability.

Thanks

tlancina commented 8 years ago

Per our offline discussion, I'm re-assigning this to @jthoms1.

jgw96 commented 8 years ago

Hello all, this should be fixed with the latest version of the Ionic cli. To install the latest version of the ionic cli simply run sudo npm install -g ionic@beta. Thanks for using Ionic!

galsch commented 8 years ago

Hi jgw96.

I have sudo npm install -g ionic@beta however still in Chrome Sourceampping works and in Safari we still have problm.

Attaching screenshot of Safari after the updating to the latest version of Ionic CLI:

screen shot 2016-06-20 at 9 24 55 pm

Pay attention to the console errors. In addition we don't see the TypeScript files as I saw in Chrome.

jgw96 commented 8 years ago

Hello @galsch would you mind giving this another try with a fresh starter app? Thanks!

galsch commented 8 years ago

@jgw96 seems like the source mapping finally works - nice job.

What was the problem and how did you make it finally work in Safari?

Also, do you have support for Webpack (I see that you're using Gulp)?

Thanks!

jgw96 commented 8 years ago

@galsch I am actually not sure of the exact problem as I was not the one that fixed it, but if i remember right it was related to just making sure the .map files were in the proper place for safari to be able to pick them up. Also, right now we are using Browserify, but we are currently hard at work on a brand new build process that will be using Webpack 2 and will include tree shaking, minification, offline template compilation and more so that the average Ionic 2 app bundle will be tiny and get to first render extremely fast. Thanks for using Ionic!

galsch commented 8 years ago

@jgw96 I'm looking forward the transition to Webpack 2.

Good luck & Great job.

Thanks

jgw96 commented 8 years ago

@galsch Thanks, I am too haha! 😃