Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 13 Next capture
2021 2022 2023
1 capture
13 Jun 22 - 13 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 /
avatar image
2
Question by Logical2u · Nov 13, 2012 at 03:15 AM · debuglogging

Debug.Log results in no output?

Hi there, I'm pretty much a complete beginner to Unity so hopefully someone is patient enough to help me through this. I'm writing a unity based javascript script in order to do some operations and math. My script looks something like this.

     function Start () {
         Debug.Log("TEST");
         //Create character array to hold the raw data.
             //Code that is not relevant for this question
     }

I've added a Debug.Log operation just so I can 'see the script in action' as it were. When I open my script in MonoDevelop, and hit Debug (that is, hitting f5), the code compiles, it links to an instance of Unity, it seems to run... and then I get nothing. No messages, no "TEST", nothing.

I would expect to see "TEST" somewhere in the Unity Console - based on what I've seen on these forums and from discussions with others.

Is there something basic I'm doing wrong? Should I be looking in a different window, or running MonoDevelop differently?

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

6 Replies

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

Answer by Eric5h5 · Nov 13, 2012 at 03:27 AM

Save the script, then switch to Unity and click the "play" icon. Also the script must be attached to some object. Don't use debug in Monodevelop unless you actually need to run the debugger.

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 Logical2u · Nov 13, 2012 at 04:26 AM 0
Share

Ah, figured it would be something simple like that. Thanks for the aid!

avatar image
1

Answer by traveler · Jan 03, 2014 at 10:22 PM

Out of desperation, I poked around in the console window and found that you need to click the Collapse tab on the left top of the console window before Debug.Log or print will work. Of course, I am working on an Android touch screen example. I haven't tried it on a Windows example yet.

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 UncapIT · Sep 12, 2017 at 05:30 PM 0
Share

Thank you for this answer! This was the only thing that worked for me.

avatar image
1

Answer by peidaqi · Jun 01, 2016 at 02:43 PM

Just to add to the probable solutions - I had the same problem and nothing above worked, until I tried "Window - Layouts - Default".

Seemed to be a weird bug (as of 5.3.5f1 Personal Edition) - though I cannot seem to recreate it either.

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
1

Answer by sbethge · Sep 12, 2019 at 12:18 PM

Another possible issue is that the little speech bubble with the exclamation mark on the right in the console tab is not toggled. That solved it for me.

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 srr3dc · Jan 04, 2020 at 03:48 AM 0
Share

O$$anonymous$$G! I spent so long thinking my script was broken when I had just unclicked that bubble at some point! Thank you so much!!!

avatar image
0

Answer by Althaen · Nov 13, 2012 at 04:23 AM

Try using

 print ("TEST");

Does the same thing.

Comment
Add comment · 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
  • 1
  • 2
  • ›

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

18 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

Related Questions

How to use Application.logMessageReceived for logging ? 3 Answers

Reopen development build console 1 Answer

How do you get OutputDebugString to show up in the Visual Studio output window? 0 Answers

Debug Wrapper Class 6 Answers

Is it possible to access the previous UnityPlayer.log file at runtime before it get's overwritten? 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