How to stop debugging in Android application in Eclipse
Asked Answered
I

4

5

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.

Inflammatory answered 28/11, 2011 at 20:17 Comment(0)
C
1

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?

Caerphilly answered 28/11, 2011 at 20:26 Comment(0)
K
10

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
Kelm answered 28/11, 2011 at 20:28 Comment(1)
i clicked on Disconnect, it solved my endless issue ... thanksBeauty
U
1

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.

Upper answered 28/11, 2011 at 20:19 Comment(2)
Please note I changed the perspective to "Java EE", and it's no longer in debug mode, so It should not break, even without removing break points. Right?Inflammatory
No, it'll still break even if you go back to the Java EE perspective. Note you can manage breakpoints (right-click on line) even in the normal development perspective.Upper
C
1

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?

Caerphilly answered 28/11, 2011 at 20:26 Comment(0)
F
0

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.

Foredoom answered 26/11, 2014 at 14:59 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.