Android Studio can't connect to debug devices.
When I click the debug button, the debug tab shows me
Connecting to the target VM, address: 'localhost:8600', transport: 'socket'
12:14:44 Error running Android Debugger (8600): Unable to open debugger port : java.io.IOException "handshake failed - connection prematurely closed"
Disconnected from the target VM, address: 'localhost:8600', transport: 'socket'
This is how I solved same issue:
1) I don't think that it is important but I: updated all pending for update ADT stuff. And restarted OS. But I still was unable to debug
2) Next: I launched AS. Opened terminal and ran this:
As you can see daemon started automatically after I asked for its state. So I did not do nothing more. Just tried to debug and this time debugging worked.
P.S. After I restarted AS debugging continued working. So there was no need in terminal manipulations anymore