Eclipse Android: Could not open Selected VM debug

2019-02-12 16:12发布

问题:

Possible Duplicate:
Could not open Selected VM debug port (8700)

I am getting this error on the console when opening Eclipse:

"Could not open Selected VM debug port (8700). Make sure you do not have >another instance of DDMS or of the eclipse plugin running. If it's being >used by something else, choose a new port number in the preferences."

pretty sure DDMS is the Andoid debugger, and I am also pretty sure it is not turned on. Does anyone know how to solve it?

回答1:

the window Host file that is messed up:
the file is at this place :
C:\WINDOWS\system32\drivers\etc

And should contain this line : 127.0.0.1 localhost

if it doesn't work then try the following as well: make the following changes in Eclipse.

Under Window -> Preferences -> Android -> DDMS:

* Set Base local debugger port to "8601"
* Check the box that says "Use ADBHOST" and the value should be "127.0.0.1"


回答2:

its is a eclipse perspective so you don't need to start it just click on the >> button on the topmost right corner you can see other perspective select DDMS there DDMS perspective will open if you want to switch back click on java perspective. If you can't see DDMS option there just go to Windows->openPerspective->others and from the dialog box select DDMS.

To activate DDMS you need to run your application in debug mode and then click on ddms you will see all options once your application started.

hope this help



回答3:

Try by changing Run-> Debug Configuration. It helped me to activate breakpoint and debugging. After changing options there is debug button click on it. It will attach debugger and launch your application.