microsoft/vscode-cordova

Cordova and Ionic applications debugging not working on iOS 12.3.1+ if WKWebView is used

SounD120 opened this issue · 4 comments

Since iOS 12.3.1 debugging of Ionic 3 and 4 apps and Cordova apps with cordova-plugin-wkwebview-engine doesn't work.
Under the hood this extension uses Chrome DevTools Protocol for debugging, but iOS devices require Webkit Remote Debugging Protocol. Ios-webkit-debug-proxy (IWDP) allows to transform Webkit Protocol to Chrome DevTools Protocol. According to IWDP issue the library hasn’t been adapted to changes in WKWebView yet.
Therefore application installs on device correctly but attach stage fails with such error:

'Debugger' domain was not foundError processing "attach": 'Debugger' domain was not found: [object Object]

Related issues: #561, #546, #559, ionic-team/cordova-plugin-ionic-webview#417, google/ios-webkit-debug-proxy#326

@SounD120 Can you also investigate why our automated tests failed to catch this ?

This is a pretty serious issue. Apple requires the use of WKWebView to submit to the App Store now (UIWebView apps are all rejected immediately automatially). With this bug still open, we are unable to debug our apps from within Cordova in VSCode.

Hi @yinzara . We are working on updating the extension to replace debugger core to vscode-js-debug right now . We cannot do much about that with the current debugger implementation due to some limitations, but with the updated version we'll have the direct access to CDP requests that the debugger sends, so we have plans to fix this during the migration #613 .

Fixed debugging of Cordova and Ionic apps on iOS v12.3.1 - v13.7 in the dev/js-debug-migration branch.