miguel
miguel

Reputation: 16580

Detach debugger in Android Studio

In Android Studio, how do you detach the debugger once it's connected and debugging a running app?

In Eclipse, the icon looked like this .

I've been disconnecting the USB cable but that seems like a brute method.

Upvotes: 29

Views: 7813

Answers (5)

Phileo99
Phileo99

Reputation: 5659

In newer versions of Android Studio, the (X) Close button in the sidebar no longer exists. If that is your case and you want to detach the debugger from Android Studio, you can tap the "X" in the tab at the top of the debugging window that says "Android Debugger (XXXX)"

enter image description here

Upvotes: 4

miguel
miguel

Reputation: 16580

The answer is the Close button. As of Android Studio v3.4 it's a red square block icon (previously was a red X).

It turns out I couldn't see it because it was hidden under the more >> icon.

Upvotes: 28

Carson Holzheimer
Carson Holzheimer

Reputation: 2963

On android studio 3.3.1 I also can't find an easy way to disconnect the emulator. I've resorted to the terminal command adb kill-server (use adb start-server to start it again)

Upvotes: 0

vovahost
vovahost

Reputation: 36007

In case the X (Close) button is not shown because it is collapsed in the toolbar:

1. Resize the Debugger window to see the X button


OR

2. Press CTRL + F4 (CMD + F4 on MAC).


OR

3. Right click on the Debugger Tab and select Close.


Then press Disconnect in the Dialog.

Upvotes: 0

Birchlabs
Birchlabs

Reputation: 8056

I'm writing this assuming that Android Studio uses the same convention as IntelliJ IDEA.

Click "close" (the button with the red ✕ in the debug panel):

enter image description here

You will be prompted. Choose whether to disconnect and/or terminate:

enter image description here

Upvotes: 8

Related Questions