Run->Debugger: App does not start in debug mode

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

Run->Debugger: App does not start in debug mode

Postby ppmoore » Wed Apr 08, 2009 9:51 am

Hello,

I'm using the RSS Reader application described here to learn more about how to code Android applications:
http://code.google.com/p/android-rss/

The problem is that I don't know which class is the entry point for the app. To proceed, I executed the app in debug mode using Run->Debug or F11, which I thought would start the debugger, which would then connect to the emulator, but prevent the app from starting. Instead, the app runs as normal.

How do I start the debugger so that the app being debugged is loaded but not started? I noticed that with another simple test app I have written with just one class, I have to manually set the breakpoint to the first line of the onCreate() method to force the debugger to act. With other debuggers I have used (eg, gdb), the debugger intercepts the program before it starts, and positions itself at the program's entry point.

Can anyone help?

Thanks,
Paul
ppmoore
Freshman
Freshman
 
Posts: 9
Joined: Thu Apr 02, 2009 5:16 pm

Top

Postby WarrenFaith » Wed Apr 08, 2009 9:59 am

How do I start the debugger so that the app being debugged is loaded but not started? I noticed that with another simple test app I have written with just one class, I have to manually set the breakpoint to the first line of the onCreate() method to force the debugger to act. With other debuggers I have used (eg, gdb), the debugger intercepts the program before it starts, and positions itself at the program's entry point.

If you debug with Eclipse, you figured out the right thing. Eclipse will just stop at breakpoints. Thats ok for me, because mainly I know where I want to start debugging.
So this is not a problem, this is a normal "feature" of Eclipse (or Jetbrains IntelliJ IDEA)
WarrenFaith
Moderator
Moderator
 
Posts: 227
Joined: Fri Mar 13, 2009 10:59 am
Location: Berlin, Germany

Postby ppmoore » Wed Apr 08, 2009 1:23 pm

Thanks WarrenFaith,

Seems strange.

Every other debugger including other IDE debuggers I've used always loads the program in a stopped state, allowing the user to manually start it using a "run" command, or something similar.

Regards,
Paul
ppmoore
Freshman
Freshman
 
Posts: 9
Joined: Thu Apr 02, 2009 5:16 pm

Postby WarrenFaith » Wed Apr 08, 2009 4:00 pm

Strange too, because I just know debugger behave the way the eclipse debugger do :)

What IDE are you talking about?
WarrenFaith
Moderator
Moderator
 
Posts: 227
Joined: Fri Mar 13, 2009 10:59 am
Location: Berlin, Germany

Postby nradford » Wed May 13, 2009 10:18 pm

Most IDE Debuggers I've used start the program in a runned state at breaks at break points. Command-line debuggers I've used start it in a stop state. I believe this is because on the command line you want to be able to set your break points before the code starts to run. While with IDE's you can set breakpoints prior to the debugger being started.
nradford
Freshman
Freshman
 
Posts: 2
Joined: Sun May 10, 2009 5:37 pm
Location: UK

Top

Return to SDK/ADT/Emulator Problems

Who is online

Users browsing this forum: No registered users and 4 guests