Original address: http://blog.csdn.net/armoonwei/article/details/7032455
breakpoint debugging does not seem to be supported at this time, but can be traced by log printing (Logcat). There is an ADB tool in the Android SDK that uses this tool to track the running Android app: adb Logcat launches Logcat and prints all the runtime information for Android apps running on the device. ADB logcat-S Unity Use this command if you want to print unity's output information only. ADB logcat-D >Logcat.txt Prints the printed information as a file. Of course, it is more straightforward to integrate your own debug information window into your application, associating the following code with a gameobject:[csharp] view plaincopy<p>usingUnityengine; usingSystem.collections;</p><p> Public classGuitextdebug:monobehaviour {Private floatWindowposition =-440.0f; Private intPositioncheck =2; Private Static stringwindowtext =""; PrivateVector2 Scrollviewvector =Vector2.zero; PrivateGuistyle Debugboxstyle; Private floatLeftside =0.0f; Private floatDebugwidth =420.0f; Public BOOLDebugison =false; Public Static voidDebugstringnewstring) {windowtext= NewString +"\ n"+windowtext; UnityEngine.Debug.Log (newstring); } voidStart () {Debugboxstyle=NewGuistyle (); Debugboxstyle.alignment=Textanchor.upperleft; Leftside= -; } voidOngui () {if(Debugison) {gui.depth=0; Gui. BeginGroup (NewRect (Windowposition,40.0f, Leftside,200.0f)); Scrollviewvector= GUI. Beginscrollview (NewRect (0,0.0f, Debugwidth,200.0f), Scrollviewvector, NewRect (0.0f,0.0f,400.0f,2000.0f)); Gui. Box (NewRect (0,0.0f, Debugwidth-20.0f,2000.0f), windowtext, Debugboxstyle); Gui. Endscrollview (); Gui. Endgroup (); if(GUI. Button (NewRect (Leftside,0.0f,75.0f,40.0f),"Debug")) { if(Positioncheck = =1) {windowposition= -440.0f; Positioncheck=2; } Else{windowposition=leftside; Positioncheck=1; } } if(GUI. Button (NewRect (Leftside + 80f,0.0f,75.0f,40.0f),"Clear") ) {windowtext=""; } } } } </p>