This is indeed just for debugging. Java debuggers cannot connect directly to the VMs running on your phone. adb, both on your computer and on the phone, is used to route connections between your computer and your device.
DDMS, through adb, connects to each VM running on your phone (or emulator). It does this by connecting to adb and asking to be connected to a specific VM on the device. Once the connection is established, DDMS talks to the VM through JDWP. Debuggers cannot connect to the VMs the same way, because they don't know how to ask adb to setup the forwarding. To resolve this problem, DDMS (which already talks to the VMs through JDWP) opens a local connection (this is the port that is displayed next to each application name). The Java Debugger then connects to DDMS, which behaves like a JDWP compatible VM, when in fact DDMS forwards all the JDWP packets between the debugger and the VM , through adb (on your computer), and adbd (on the phone). If you use Eclipse with the Android plug-ins, then you don't need to worry about this. ADT includes a version of DDMS running inside Eclipse. When ADT setups a debugging session, it automatically connects the Eclipse debugger to DDMS on the port corresponding to the application you are trying to debug. Xav ---------- Forwarded message ---------- From: jtaylor <[email protected]> Date: Mon, May 18, 2009 at 2:54 PM Subject: [android-beginners] Re: What is Port Forwarding? To: Android Beginners <[email protected]> Yes, must be just for debugging. Something I don't need to get into if I'm using Eclipse I'm sure. "For more information on port-forwarding with DDMS, read Configuring your IDE to attach to port 8700 for debugging." http://developer.android.com/guide/developing/tools/ddms.html + Juan On May 18, 5:46 pm, Nicholas Radford <[email protected]> wrote: > Probably not, I only know of it because I often have to setup rules when > people need to get to things hoated in my network > > On May 18, 2009 10:40 PM, "jtaylor" <[email protected]> wrote: > > I asked this in January but didn't get an answer. I don't think it's > clear for people who don't know Networking. > > + Juan > > On May 18, 5:37 pm, jtaylor <[email protected]> wrote: > lol Yeah, but I > still don't understand w... -- Xavier Ducrohet Android Developer Tools Engineer Google Inc. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Android Beginners" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en -~----------~----~----~----~------~----~------~--~---

