Here's how:
(1) The phone is connected to the phone via a data cable.
(2) Set up in Phone: set-up application--Development-->USB debugging
(3) In the CMD test, the connection is normal, cmd command as follows:
ADB devices Enter
If your device name is displayed, the connection is OK.
(4) Rewrite androidmanifest.xml
<application android:icon= "@drawable/ic_launcher" android:label= "@string/app_name" android: Debuggable= "true" >
(5) Perform a real-machine debug operation:
Right-click Project-->debug as-->debug configurations-->target tab in Eclipse-Select manual
Click below debug--> to select your device-->ok
(This effect is only after rebooting the system)
Your device will begin to execute your Android app! Very smooth.
Next time you want to debug, you can click Run and select your device, then OK.
(6) Note: Regardless of whether you use eclipse
Any Android software that has an exception running on the real machine can be viewed under the command-line window for specific exceptions.
Input in cmd: adb logc at enter
if it is a window system, you will be prompted to install the driver, Select the correct Android SDK installation directory, and then click Next, the system will start to install the driver.
android--Real-Machine Debug program method