【发布时间】:2016-09-20 11:31:04
【问题描述】:
我无法再在 iOS 模拟器上调试我的 Cordova 应用程序。我得到了可怕的“我们无法找到应用程序......你正在尝试调试。”错误。我已经尝试了所有故障排除步骤,但到目前为止没有任何效果。
我应该注意到这个 工作得很好。我能够多次调试我的应用程序,没有任何问题,然后突然出现此错误,我尝试过的任何方法都无法修复它。
有趣的是,Visual Studio 中的实际构建日志看起来一切正常:
Requesting debug on remote iOS device for buildNumber 6805 on server https://<redacted>:3000/cordova...
Debugging - Successfully Debugging on the device
{webDebugPort=9221}
有人有什么想法吗?
更新 1 在我的本地 OS X 设备上也试过这个,得到了类似的结果。以下是实际的构建日志:
Unable to attach to debug. Check that http://Matts-Mac-mini:9221 is accessible.
We were unable to find the app you’re trying to debug. Check that the device is connected, awake, and unlocked. Also, make sure it has Web Inspector enabled.
------ Cordova tools 6.1.1 already installed.
Requesting emulate on iOS Simulator for buildNumber 522 on server http://Matts-Mac-mini:3000/cordova...
Emulated - Successfully sent to ios Simulator
------ Cordova tools 6.1.1 already installed.
Requesting debug on remote iOS device for buildNumber 522 on server http://Matts-Mac-mini:3000/cordova...
Debugging - Successfully Debugging on the device
{webDebugPort=9221}
看起来事情失败了,但后来的消息(立即出现)使它看起来像事情成功了。该应用程序确实在我的 Mac 上的模拟器中运行。
【问题讨论】:
-
尝试打开 safari Web Inspector。见this link。
-
已经这样做了。 Web Inspector 已在模拟器中启用。我尝试禁用它,调试应用程序(按预期失败),然后重新启用它。结果和以前一样。
-
我发现了一个类似的案例here。我认为您可以尝试 Jordan Matthiesen 回答的步骤来更改超时。
-
也已经尝试过了。更改超时没有效果。奇怪的是,即使我尝试在不调试的情况下启动项目,Visual Studio 在构建完成后仍会冻结 30 秒左右。
-
运行 iOS 模拟器的机器是否运行了多个模拟器(例如,作为另一个用户)?还要检查是否有
ios_webkit_debug_proxy程序正在运行。如果发生这种情况的只有一个 iOS 模拟器正在运行,并且在尝试 f5 之前没有ios_webkit_debug_proxy实例,那么您的应用程序是否是托管应用程序,我的意思是您是否在线托管您的应用程序而不是将 html 捆绑在应用程序本身中?