Hi Eckel, to debug with another debugger than Eclipse/ADT (jdb, NetBeans, IntelliJ, etc...) you will need to use DDMS.
DDMS allows connecting a Java debugger to a process running on the emulator, as if it was a standard remote application. The Device/process View in DDMS show a port number for each applications. Simply setup your debugger of choice to connect to a remove Java application on localhost and the port indicated by DDMS. In order not have to change the port all the time, selecting a process in ddms will make the process listen on both its normal port and the port 8700 (this can specific port can be changed in the preferences if needed). The column view will then show "8700/8601" for instance. if you want to put break point early in your code (in your activity onCreate for instance) you can stall your application with android.os.Debug.waitForDebugger() which will block until a debugger is connected. The process will show up with a red bug icon in DDMS. When the debugger is connected, the icon will turn green. ADT is basically doing the same thing automatically: - it launches the application through the device side command line tool 'am' with the -D option to stall the VM until a debugger is connected. - once the application show up in DDMS (ADT embeds DDMS as an Eclipse plugin) in "wait-for-debugger" mode, it automatically connects the Eclipse debugger to the application. Xav On Sun, Mar 23, 2008 at 11:57 PM, Eckel <[EMAIL PROTECTED]> wrote: > > We can set a break point and step by step debug apps by eclipse adt > plugin, but without eclipse, how to step by step debug android apps by > command line? > > Thanks, > Eckel > > > --~--~---------~--~----~------------~-------~--~----~ 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] Announcing the new M5 SDK! http://android-developers.blogspot.com/2008/02/android-sdk-m5-rc14-now-available.html For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~----------~----~----~----~------~----~------~--~---

