Found the Remote Java Application debug entry, set it to localhost/
8700,
after a while it says "Failed to connect to remote VM, session timed
out."
Tried with both Connection Type of Attache and Listen.  Tried enabling
and disabling "Allow termination of remote VM".

DDMS seems to only be able run "ps", nothing updates, nothing shows
in the left panel execpt "?" and the process ID and ports.

little circles,
  mike

On Mar 5, 6:44 pm, Dianne Hackborn <[email protected]> wrote:
> Yeah Eclipse is hard to figure out.  Basically you can go into the Eclipse
> run menu for starting the debugger ("Open Debug Dialog..." on and the
> "Remote Java Application" category on mine, your version may be different),
> to have it attach to a socket.  So in ddms, click on the process you want to
> debug, which will forward it to port 8700, and then in the eclipse dialog
> select host as "localhost" and port as "8700" to attach a debugger to it.
>
> On Thu, Mar 5, 2009 at 5:16 PM, Mike Collins <[email protected]>wrote:
>
>
>
>
>
>
>
> > I'm perfectly happy to put everything in one APK if I can make it
> > work.
>
> > Pardon my ignorance, when you say "directly attach adb to a process
> > and
> > debug it" does that connect somehow with the Eclipse debugger?  The
> > doc's
> > I've seen on adb don't indicate it is a debugger, just a bridge.  I'm
> > not a very
> > savy Eclipse user.
>
> >  mike
>
> > On Mar 5, 3:11 pm, Dianne Hackborn <[email protected]> wrote:
> > > Yeah you can directly attach adb to any process and debug it.  You can
> > also
> > > have your process call Debug.waitForDebugger() if there is a place you
> > want
> > > to block for the debugger to attach.
>
> > > Splitting an app into multiple .apks just to have it run in two processes
> > is
> > > very much not the model we encourage.
>
> > > On Thu, Mar 5, 2009 at 3:05 PM, Marco Nelissen <[email protected]>
> > wrote:
>
> > > > I should have read further... :)
> > > > So you already tried that, but can't debug it? That seems weird. Why
> > > > can't you just attach the debugger to the other process? What happens
> > > > when you try?
>
> > > > On Thu, Mar 5, 2009 at 3:03 PM, Marco Nelissen <[email protected]>
> > > > wrote:
> > > > > You can put everything in the same package, and make the service runs
> > > > > in a different process by specifying the "android:process" attribute
> > > > > for the service in your manifest.
>
> > > > > On Thu, Mar 5, 2009 at 3:01 PM, Mike Collins <
> > [email protected]>
> > > > wrote:
>
> > > > >> The Android Market appears to only support "applications" that are a
> > > > >> single APK.
> > > > >> I've asked over there if this is not the case and Google says making
> > > > >> it a single
> > > > >> APK is the answer.
>
> > > > >> We have an application that has a long-lived background service and
> > a
> > > > >> user interface
> > > > >> application, in two distinct processes.  Development is done with
> > > > >> Eclipse as two
> > > > >> distinct project/packages yeilding two APKs that are installed.
> >  This
> > > > >> works just fine,
> > > > >> except that the Market doesn't support it.
>
> > > > >> I've mushed the two projects together into one which yeilds one APK
> > > > >> with the
> > > > >> service marked as run in a separate process.  This functions
> > properly
> > > > >> and the service
> > > > >> remains running without the UI.  However I am unable to debug in the
> > > > >> service since
> > > > >> the process is not visible to me.
>
> > > > >> Not being able to debug the major part of the code is not condusive
> > to
> > > > >> producing
> > > > >> substantive applications.  Having to develop the code as distinct
> > > > >> projects and then
> > > > >> when complete mush it together and hope for the best is not good
> > > > >> engineering.
>
> > > > >> Flipping the "remote" switch in the manifest for the service is not
> > > > >> very viable since a
> > > > >> lot of code that will run correctly as a single process will fault
> > > > >> when split and without
> > > > >> being able to debug into both process finding these is going to be
> > > > >> very painful.
>
> > > > >> Am I missing something?
>
> > > > >> tia,
> > > > >>  mike
>
> > > --
> > > Dianne Hackborn
> > > Android framework engineer
> > > [email protected]
>
> > > Note: please don't send private questions to me, as I don't have time to
> > > provide private support.  All such questions should be posted on public
> > > forums, where I and others can see and answer them.- Hide quoted text -
>
> > > - Show quoted text -
>
> --
> Dianne Hackborn
> Android framework engineer
> [email protected]
>
> Note: please don't send private questions to me, as I don't have time to
> provide private support.  All such questions should be posted on public
> forums, where I and others can see and answer them.- Hide quoted text -
>
> - Show quoted text -
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Developers" 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-developers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to