I’ve connected my Nexus One device to the PC. The USB debugging on the device is on. When I run the app from Eclipse, it works fine on the device. However, if I attempt to Debug, i get a message box on the Nexus One stating that it’s waiting for the debugger to attach. On the Eclipse side, after about 20 or so seconds of thinking I get the following in the Console
Attempting to connect debugger to 'com.angryhacker.printerfun' on port 8600
Launch error: Failed to connect to remote VM. Connection timed out.
What am I missing?
1) Enabling USB debugging on the device is the first step. It sounds like you’ve done that … but it wouldn’t hurt to double check everything:
http://developer.android.com/guide/developing/device.html
2) As the same link also says, make sure debugging is enabled in your project’s AndroidManifest.xml
3) Definitely check your host PC’s firewall (for example, Windows firewall) to make sure it isn’t blocking any ports.
4) For troubleshooting purposes, you can also try:
ADDENDUM:
Q: I’m assuming you’ve NEVER successfully downloaded and run an .apk from your Eclipse compiler to your NexusOne handset. Correct?
Q: I’m also assuming that when you try “Debug As”, you see your physical handset in the GUI, and you’ve selected it. Correct?