This can be occurring due to any of the following reasons:
1. Your application xml doesn't have INTERNET permissions (it is needed for wifi device debugging).
2. Your desktop isn't accessible from your device (try accessing it from HTC browser).
3. If you are on windows 7, you haven't disabled all 3 firewall settings.
If you have a Droid or Nexus One can you please try this on that too (this is just to see if it works for you even on supported devices).
Let us know if you still see the issue after checking up on all these things.
I just figured out how to do this yesterday:
- Download Windows Grep and install it: http://gnuwin32.sourceforge.net/packages/grep.htm
- Add path to the Grep bin folder (C:\Program Files (x86)\GnuWin32\bin) to the PATH of your SYSTEM VARIABLES in your ENVIRONMENT VARIABLES.
- I think you have to reboot for this to take effect.
- You should already have the Android SDK installed. Open a command window in this folder: C:\android-sdk-windows\tools
- If you don't know how to enable the right-click option to enable OPEN A COMMAND WINDOW HERE directly on a folder, then google it, it takes literally 1-2 minutes to enable on Windows 7 and is a major time saver.
- Plug your phone to the USB and make sure it's connected by typing in: adb devices
- Then, type this into the command window: adb logcat | grep ~
- In your AS3 code, you now want to prepend all your trace statements with the same identifying character, in this example we are using: ~
- Here's the sample AS3 code that I use:
private static constant Q:String = "~ ";
trace (Q + "Your trace statement " + anyOtherVarsHere);
- When you deploy to your phone, make sure you do a DEBUG deployment.
- When the IP address window pops up on your phone, just hit cancel.
- You should see the trace statement in the command window.
- Just leave this window open on a second monitor and debug away!
You can use any non-reserved, valid characters in logcat. I used ~ in my example. Hope this helps!
Adb logcat is used by many Android developers to see log data coming from your phone. But, it will print EVERYTHING. Try typing in "adb logcat" and see what happens in the command window. Not a pretty sight, huh? So, to make debugging a lot more manageable, we pipe all the data coming from logcat into grep, which allows us to filter what's actually printed to the screen.
More info on adb logcat here: http://developer.android.com/guide/developing/tools/adb.html
More info on grep here: http://sourceforge.net/projects/gnuwin32/forums/forum/74807