On my Mac, I am able to execute cordova build
or cordova run
without problems. But when it comes to debugging, I always get the error
[cordova-debug-adapter] Error: Unable to find web view
In the debug console, the last output is
Configuring debugging proxy
According to the documentation of ios_webkit_debug_proxy
, I should see the connected devices on http://localhost:9221. But this page can be displayed only, when I start ios_webkit_debug_proxy
manually in the terminal:
$ios_webkit_debug_proxy
Listing devices on :9221
Connected :9222 to SIMULATOR (SIMULATOR)
But when I try debugging, I still get the same error.
The configuration in my launch.json
is
{
"name": "Attach to running iOS on simulator",
"type": "cordova",
"request": "attach",
"platform": "ios",
"target": "emulator",
"port": 9220,
"sourceMaps": true,
"cwd": "${workspaceRoot}"
}
I was wondering, that here the port is 9220, but the proxy tells something with 9222. Therefore I changed the port in launch.json
, too. But this produces only another error:
[cordova-debug-adapter] Error: Unable to find iOS target device/simulator. Try specifying a different "port" parameter in launch.son
I am using the following versions:
- Cordova Tools: 1.0.4
- ideviceinstaller: 1.1.0_2
- iso-webkit-debug-proxy: 1.6