debugging app with a standalone remote debugger

Common bugs/problems with the Android SDK the Emulator and the ADT-Plugin.

debugging app with a standalone remote debugger

Postby giuseppe.ciaccio » Thu Oct 14, 2010 6:01 pm

Hello,
I'm trying --not-- to use eclipse for developing android apps on the emulator, hence I tried to use a standalone remote-capable java debugger. I've tried with jdb, and jswat. But things are going bad...let me explain...

These are the steps I perform:

1) turn on the emulator, install my app on the emulator from command line (adb install)
2) turn on the dalvik server, again from command line (ddms)
3) on the emulator, run the "DevTools" app --> "Development Settings" --> select the app I want to debug, enable the "Wait for debugger" flag
4) again in the emulator, run my app; it blocks, waiting for a debugger to attach, and dalvik will show a new process flagged by a "red bug"
5) on dalvik, select the red-flagged process; its debug port is thus forwarded to localhost:8700
6) hook the debugger to localhost:8700; with jdb: "jdb -attach 8700"; with jswat, there is a suitable menu entry for this.

As soon as the debugger is launched, my app on the emulator unblocks. So, it seems that the app has properly detected a debugger and thus runs free.

The point, however, is that it "runs free", that is, it will not wait for the debugger to issue a "run" command. So I have no chance to set up any breakpoints :cry:

I've tried by putting waiting loops at the beginning of my app, in the hope I'd have the time to set a breakpoint.
But, when I try to set a breakpoint, jdb says "Deferring breakpoint XXX.YYY. It will be set after the class is loaded.", as the app was not running yet. If I then issue a "run" command, the answer is "Nothing suspended.", as
the app was already running (as it is indeed).

Anybody has encountered anything similar before? Any suggestions?

I've also added the debuggable flag into the manifest but nothing has changed :(
giuseppe.ciaccio
Once Poster
Once Poster
 
Posts: 1
Joined: Thu Oct 14, 2010 5:28 pm

Top

Return to SDK/ADT/Emulator Problems

Who is online

Users browsing this forum: No registered users and 4 guests