Question

I'm writing a simple Android application. I changed the "Java EE" perspective to "debug" and after tracing variables, I return to original perspective ( "Java EE" ) and stopped debugging. But when I try to run my application on my phone, it changes the perspective automatically to debug and jumps to first break point.
In debug window, it shows: debugging

DalvikVM[localhost:8600]    
    Thread [<1> main] (Suspended (breakpoint at line 23 in FirstActivity))  
        FirstActivity.onCreate(Bundle) line: 23 
        Instrumentation.callActivityOnCreate(Activity, Bundle) line: 1047   
        ActivityThread.performLaunchActivity(ActivityThread$ActivityRecord, Intent) line: 2627  
        ActivityThread.handleLaunchActivity(ActivityThread$ActivityRecord, Intent) line: 2679   
        ActivityThread.access$2300(ActivityThread, ActivityThread$ActivityRecord, Intent) line: 125 
        ActivityThread$H.handleMessage(Message) line: 2033  
        ActivityThread$H(Handler).dispatchMessage(Message) line: 99 
        Looper.loop() line: 123 
        ActivityThread.main(String[]) line: 4627    
        Method.invokeNative(Object, Object[], Class, Class[], Class, int, boolean) line: not available [native method]  
        Method.invoke(Object, Object...) line: 521  
        ZygoteInit$MethodAndArgsCaller.run() line: 871  
        ZygoteInit.main(String[]) line: 629 
        NativeStart.main(String[]) line: not available [native method]  
    Thread [<7> Binder Thread #2] (Running) 
    Thread [<6> Binder Thread #1] (Running) 

Would you please help me how get rid of this debug perspective ?

Regards.

Was it helpful?

Solution

How are you launching the application? If you're using a shortcut, make sure you're doing Run As... Android Application rather than Debug As... Android Application. I'm out of practice, but I believe the shortcut for Run As in Eclipse is Ctrl+F11?

OTHER TIPS

Suggestions:

  • When you right click the project, make sure you select 'Run as' rather than 'Debug as'
  • While in the debug perspective, click the icon to disconnect the debugger (In my eclipse, it's the icon to the right of the Stop icon)
  • Disable all breakpoints

Remove or disable the breakpoint on FirstActivity.onCreate(Bundle) line: 23

Alternatively, restart your app using a Run Configuration from the Eclipse menu instead of a Debug config.

I kept getting the debug perspective despite all the having configured all the settings that were posted above.

I found an answer on another StackOverflow: Reboot your debugging device.

(Don't power off, instead choose Reboot). That worked for me.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top