问题
I am debugging my Android app by having it stop at a breakpoint. Indeed, execution stops at the breakpoint, but once I step over one step, then step into, the problems start: Instead of stepping into the function, the debugger seems to perform a step over, just highlighting the next line. When I then press step over, a message box pops up with one of the following messages:
com.sun.jdi.VMDisconnectedException: Got IOException from Virtual Machine occurred creating step request.
or
org.eclipse.jdi.TimeoutException: Timeout occurred while waiting for packet xxx occurred creating step request.
This happens whenever I perform the steps above (Always on the same breakpoint), which is preventing me from debugging my app.
I am debugging on a real device, using Eclipse on Windows.
I already tried:
- Restarting Eclipse
- Increasing the Debugging Timeout in Eclipse, which just leads to the first error to appear more often in comparison
Now here are my questions:
Has anyone else come across this problem?
What could I do to solve the problem?
回答1:
These exceptions occur when you have a class that don't exists in the application to be debugged.
I did have this same problem with Java EE (no Android, but same exceptions). Two projects (jar files in this case) with same classes and package names. So, the code that was debugged wasn't the running code, then Eclipse throwed IOException.
Probably there are another cases that this occurs.
来源:https://stackoverflow.com/questions/21388110/vmdisconnectedexception-while-debugging-android-app