Debugging Ionic 2 app using Typescript - source map file not seen by VS 2015 debugger as well as Safari Mac browser

孤人 提交于 2019-12-12 18:35:00

问题


I think the picture 1 below will explain the best the issue I am facing

I created Ionic2 app on my Windows 10 PC with this command: ionic start -a "myapp" -i com.mycomp.myapp --v2 sidemenu

I then imported it in Visual Studio 2015 with TACO installed. I added ios platform and attached my iPad 2 air to my mac connected to wifi. In tsconfig.json I added "sourceMap": true to enable .ts debugging.

Picture 1:

I am not sure how to see network trafic when using VS 2015 (I could not fine any tab showing it) so in the second picture you can see the results of Safari web inspector page that shows loaded .html, .css and .js files.

I believe that I should see some file(s) with .js.map extension that from my earlier experienfe Chrome browser uses to enable .ts debugging. Is this my problem. How to get it to appear? In the first picture you can see that main.js.map was built, but

Picture 2 shows Web Inspector view of IPad Index.html from my app deployed and running. Network tab opened. You can see no main.js.map is served.

Picture 3 shows Web Inspecto, Resources tab. YOu can see that under main.js there is page2.ts (I guess ready to connect to main.js.map IF IT IS SERVED SOMEHOW.

And finally Picture 4 show Ipa Payload content unzipped that shows the presence of main.js.map. So it is deployed but how can VS 2015 see it in debugging mode. Also Safari could not break into page2.ts obviously because it also couldn't obtain main.js.map file

Let me know If you see something wrong and explain how is .map file loaded by a debugging engine like VS 2015 and Chrome and Safari browsers?

Thanks, Rad

来源:https://stackoverflow.com/questions/40356559/debugging-ionic-2-app-using-typescript-source-map-file-not-seen-by-vs-2015-deb

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!