天天看點

在Windows電腦上調試安裝在iOS裝置上的SAP UI5應用

It is possible to debug a UI5 application running on an iOS device with a windows laptop.

Suppose I have deployed my UI5 application to SAP cloud platform:

https://jerrylist.cfapps.eu10.hana.ondemand.com/ui5/.

Now I launch this application in my iPad:

在Windows電腦上調試安裝在iOS裝置上的SAP UI5應用
在Windows電腦上調試安裝在iOS裝置上的SAP UI5應用

And I would like to debug this UI5 application which is running on iPad with my windows laptop. Here below are detailed steps:

(1) install iTunes

https://www.apple.com/cn/itunes/download/

so that your iOS device could be recognized by your windows laptop.

(2) Switch on “Web Inspector” in iPad->Settings->Advanced.

在Windows電腦上調試安裝在iOS裝置上的SAP UI5應用
在Windows電腦上調試安裝在iOS裝置上的SAP UI5應用

(3) Download ios-webkit-debug-proxy-win32 from github.

Extract the .zip file to a folder in your laptop and add this folder to Path environment variable.

在Windows電腦上調試安裝在iOS裝置上的SAP UI5應用
在Windows電腦上調試安裝在iOS裝置上的SAP UI5應用

(4) Open windows command prompt, type the following command, and you can see that the iPad is successfully connected.

在Windows電腦上調試安裝在iOS裝置上的SAP UI5應用
在Windows電腦上調試安裝在iOS裝置上的SAP UI5應用

Access http://localhost:9221, and my iOS device is listed here:

在Windows電腦上調試安裝在iOS裝置上的SAP UI5應用

Click the hyperlink “localhost:9222”, then the active Safari page which displays my UI5 application is listed there:

在Windows電腦上調試安裝在iOS裝置上的SAP UI5應用

Click the hyperlink, and Chrome development tool window is opened automatically. Now it is ready to debug – for example press the “approve” button in my iPad, and the breakpoint set in the corresponding event handler in my laptop is triggered.

Happy debugging!

在Windows電腦上調試安裝在iOS裝置上的SAP UI5應用
在Windows電腦上調試安裝在iOS裝置上的SAP UI5應用

繼續閱讀