首页 文章

Xamarin Android(Visual Studio 2015)无法连接到调试器

提问于
浏览
32

我有一个android调试器(Visual Studio 2015)的问题,因为它总是在启动调试后立即停止(它没有调试就可以正常工作),我的机器重置并重新安装了Visual Studio 2015,但它没有帮助 .

Here is the log from logcat :monodroid-debug错误接受stdout和stderr(127.0.0.1:8896)地址已在使用中

Here is the log from Xamarin log

Mono.Debugging.Soft.ConnectionException: Could not connect to the debugger. ---> Mono.Debugger.Soft.VMDisconnectedException: Exception of type 'Mono.Debugger.Soft.VMDisconnectedException' was thrown.

Server stack trace: 
at Mono.Debugger.Soft.Connection.SendReceive(CommandSet command_set, Int32 command, PacketWriter packet)
at Mono.Debugger.Soft.Connection.VM_GetVersion()
at Mono.Debugger.Soft.Connection.Connect()
at Mono.Debugger.Soft.VirtualMachine.connect()
at Mono.Debugger.Soft.VirtualMachineManager.Connect(Connection transport, StreamReader standardOutput, StreamReader standardError)
at Mono.Debugger.Soft.VirtualMachineManager.ConnectInternal(Socket dbg_sock, Socket con_sock, IPEndPoint dbg_ep, IPEndPoint con_ep)
at System.Runtime.Remoting.Messaging.StackBuilderSink._PrivateProcessMessage(IntPtr md, Object[] args, Object server, Object[]& outArgs)
at System.Runtime.Remoting.Messaging.StackBuilderSink.AsyncProcessMessage(IMessage msg, IMessageSink replySink)

Exception rethrown at [0]: 
at System.Runtime.Remoting.Proxies.RealProxy.EndInvokeHelper(Message reqMsg, Boolean bProxyCase)
at System.Runtime.Remoting.Proxies.RemotingProxy.Invoke(Object NotUsed, MessageData& msgData)
at Mono.Debugger.Soft.VirtualMachineManager.ConnectCallback.EndInvoke(IAsyncResult result)
at Mono.Debugger.Soft.VirtualMachineManager.EndConnect(IAsyncResult asyncResult)
at Mono.Debugging.Soft.SoftDebuggerSession.<>c__DisplayClass9.b__8(IAsyncResult ar)
--- End of inner exception stack trace ---

任何帮助深表感谢!

4 回答

  • 1

    我有同样的问题,我可以通过以下方式连接调试器:

    http://dotnetbyexample.blogspot.cz/2016/02/fix-for-could-not-connect-to-debugger.html

    简而言之:

    • 在Android项目中禁用“使用快速部署(仅限调试模式)” - >属性 - > Android选项 - >打包

    • 在Hyper-V管理器中启用“迁移到具有不同处理器版本的物理计算机”转到VM - >设置 - >处理器 - >兼容性

  • 1

    对我来说,这是在Windows 10上运行的DELL笔记本电脑的一个问题,在我回滚到Windows 8.1之后,现在工作正常

  • 55

    接受stdout和stderr(127.0.0.1:8896)地址已被使用时出错

    这已被报告给Xamarin为Bug 34476 .

  • 0

    虽然问题出在VS 2015上 . 最近有视觉工作室2017版15.2有这个问题 . 在我的案例中,卸载visual studio并降级到之前的工作VS有所帮助 . 希望很快他们会解决这个问题 . https://forums.xamarin.com/discussion/95555/how-to-downgrade-visual-studio-2017-version-15-2-to-15-0

相关问题