inspectdev / inspect-issues

Issue tracker for Inspect
22 stars 2 forks source link

Debugger: No variables are shown for WKWebView #159

Open meidlinga opened 1 year ago

meidlinga commented 1 year ago

I am trying to debug a Cordova app on an iPhone having iOS 12.5.6. When a breakpoint is hit, no variables are shown. My version of idevicedebug is 1.3.0.

Steps to Reproduce:

  1. Set breakpoint
  2. Let the breakpoint be hit
  3. Look at variables

image

auchenberg commented 1 year ago

Hi @meidlinga

Thanks for the report. Do you know what kind of webview your cordova app is using?

meidlinga commented 1 year ago

Thanks for the fast response. The app should be using WKWebView.

Upon opening hte app in the sidebar, inspect prints the following:

17:28:11.796 › Selecting page '2' on app 'PID:486' with type 'WIRTypeWeb' and forwarding socket setup
17:28:11.797 › detectTargetProtocol. platformVersion=12.5.6, pageType='WIRTypeWeb'
17:28:11.798 › Checking which communication style to use (Safari on platform version '12.5.6')
17:28:11.799 › Platform version equal or higher than '12.2': true
17:28:11.799 › Setting communication protocol: using Target-based communication
17:28:11.799 › detectTargetProtocol. isTargetBased=true'
17:28:11.799 › Sending '_rpc_forwardSocketSetup:' message to app 'PID:486', page '2' (id: 28): 'setSenderKey'

Additionally, I noticed, that local variables are displayed, when I hover over them.

auchenberg commented 1 year ago

Got it, thanks for the logs. That clarifies that the device communication works, but we might have a mapping issue.

meidlinga commented 1 year ago

@auchenberg : i see. Is there anything I can test, or support with? For example using libmobiledevicetools directly?