Unity调试Android设备 [英] Unity debugging for android devices

查看:514
本文介绍了Unity调试Android设备的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我很难将断点调试工作与Android设备统一起来。我已经尝试了视觉工作室代码和monodevelop。



在android中:



我已经成功完成了这里概述的所有步骤在tcpip模式下通过wifi连接Android:



统一



在构建设置中,我已经进行了开发构建和脚本调试。当我构建和运行它,它通过wifi编程我的设备。



对于monodevelop



我尝试使用附加到进程进行调试,但它只能找到Unity Editor。
许多人都有同样的问题:



我也想看看可以选择哪些进程,但是当我尝试运行Unity Attach Debugger 从命令调色板,我得到这个错误:command'attach.attachToDebugger'not found


解决方案

我今天也遇到问题。



您的前台步骤正确。问题是附加到进程。



在android设备上运行应用程序后,关闭unity但保持monodevelop,然后单击运行按钮(或菜单Run | Attach to Process)的monodevelop。现在您可以在对话框中看到设备列表。



它适用于我。我发现你提到的线程的解决方案



#15 manuelpeirone的回答


I'm having a hard time getting breakpoint debugging working for unity with and android device. I've tried with both visual studio code and monodevelop.

In android:

I have successfully done all the steps outlined here for getting android connected over wifi in tcpip mode: https://docs.unity3d.com/Manual/AttachingMonoDevelopDebuggerToAnAndroidDevice.html

In unity

In build settings I have "development build" and "script debugging" checked. When I build and run, it programs my device just fine over wifi.

For monodevelop

I try debugging with "attach to process" but it only finds the Unity Editor. Lots of people have the same problem:https://forum.unity3d.com/threads/attaching-monodevelop-debugger-to-an-android-device.245814/ Down at the bottom, people are figuring out that multicast settings were the issue. I have a linksys router, and I've ensured that security->filter multicast is unchecked. Is there anything else I have to do here to get multicast to work?

Since monodevelop wasn't working, I tried with vscode

For VS code

I added the plugin to an empty project as described here: https://code.visualstudio.com/Docs/runtimes/unity

When I try debugging with vscode I get the error "Could not find target name 'Android Player'. Is it running?"

I also wanted to see which processes I could select but when I try running "Unity Attach Debugger" from the command palette, I get this error: "command 'attach.attachToDebugger' not found"

Any help would be much appreciated!

解决方案

I also got the problem today.

Your front steps are correct. Problem is "Attach to Process".

After app run on android device, close unity but keep monodevelop, then click the run button(or menu Run | Attach to Process) of monodevelop. Now u can see device list in the dialog.

It works for me. I found the solution from the thread u mentioned

#15 manuelpeirone's answer

这篇关于Unity调试Android设备的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆