Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 12 Next capture
2021 2022 2023
1 capture
12 Jun 22 - 12 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
  • Help Room /
avatar image
3
Question by SimRuJ · Mar 09, 2018 at 11:34 AM · androiddebugconsoleusb

Debug Android device in Unity (via USB)

I only started working with Unity yesterday and since I come from Eclipse, where you can simply connect your phone to your PC via USB (with developer mode and USB debugging enabled, of course) and it instantly starts showing logs in Logcat (it doesn't even matter if you start the app directly on your phone or through Eclipse), I'm a bit confused about how you're supposed to debug your app in Unity.

If I press the "Play" button, it shows my "Debug.Log("test");" log but how do I get the logs while the app is running on my actual Android device?

I already tried "Run - Attach to Process - 'Unity editor' - Attach" in MonoDevelop and "Debug - Attach Unity Debugger - pick my app - Okay" in Visual Studio but it doesn't show any logs in any of the tabs that open up.

The console in Unity has an option to switch from "Editor" to "AndroidPlayer(ADB@127.0.0.1:34999)" but it doesn't show my logs then either.

I can't use wifi and I don't want to debug using cmd because it's a pain in the butt to start up and find anything.

Versions:

  • Unity: 2017.3.1f1 Personal

  • Win 10

  • Android 7.0

Comment
Add comment
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

2 Replies

· Add your reply
  • Sort: 
avatar image
5
Best Answer

Answer by SimRuJ · Apr 04, 2018 at 08:34 AM

I found a good workaround:

The Android SDK has its own stand-alone monitor (that looks like the logcat in Eclipse/Android Studio)!

Path: tools\lib\monitor-x86\monitor.exe

or: tools\lib\monitor-x86_64\monitor.exe

or just use the .bat file: tools\monitor.bat

You don't have to attach Unity's debugger to it, simply connect your phone to your PC via USB cable (make sure it's in developer mode), open up the monitor and it should pretty much instantly start giving you log messages.

To only show Unity's logs, add a new filter that uses the log tag "Unity".

Comment
Add comment · Show 2 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image inejwstine · Oct 31, 2018 at 09:20 PM 0
Share

Dang, that's useful! But always so hard to find! I finally pinned a shortcut to it to my taskbar, haha! Thanks! :-)

avatar image BlackBindy · Dec 18, 2018 at 01:02 AM 0
Share

it is perfect!! thanks a lot

avatar image
5

Answer by Cuttlas-U · Mar 09, 2018 at 12:44 PM

hey ; u can use logcat for unity too;

// run this in commend promphet when the mobile is attached and the game is runing;

adb logcat -s Unity ActivityManager PackageManager dalvikvm DEBUG

Comment
Add comment · Show 1 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image SimRuJ · Mar 09, 2018 at 01:38 PM 0
Share

How do I make it show the logcat in Unity?

Using cmd is exactly what I don't want to do (for the reasons I mentioned above), I'm looking for a way to make the logs show up directly in Unity's (preferebly) or Visual Studios's/$$anonymous$$onoDevelop's console.

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this Question

Answers Answers and Comments

224 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

Exception: Unity.IL2CPP.Building.BuilderFailedException: 2 Answers

Debugging on an Android device which I don't have 0 Answers

Cannot debug in Android using Unity Remote 5 0 Answers

Why does disconnecting my phone from my pc change the game version saved on my phone? 0 Answers

I'm getting this error everytime I'm Changing my platform to Android in Unity v. 5.2.1f1 0 Answers


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges