主权项 |
1. A computer-implemented method comprising:
initiating, by a debug monitor, a respective Java Debug Wire Protocol (JDWP) connection between the debug monitor and each of a plurality of virtual machines, wherein the debug monitor is hosted on a computing device and the virtual machines are not hosted on the computing device, generating, by the debug monitor, a first request packet of JDWP data including, in an unreserved bits section of the first request packet, a Dalvik Debug Monitor (DDM) protocol request to at least one of the virtual machines for current state information of the at least one virtual machine, wherein the current state information of the at least one virtual machine includes at least one state variable of the at least one virtual machine; transmitting, by the debug monitor over the respective JDWP connection to at least one of the virtual machines, the first request packet of JDWP data including the DDM protocol request for current state information of the at least one virtual machine; receiving, by the debug monitor and in response to the first request, a first reply packet of JDWP data that includes, in an unreserved bits section of the first reply packet, a DDM protocol reply that includes the current state information of the at least one virtual machine, the current state information including the at least one state variable; receiving, by the debug monitor, at least one DDM protocol debug command from a debugger for debugging a particular application loaded on one of the virtual machines; generating, by the debug monitor, a second request packet of JDWP data including, in an unreserved bits section of the second request packet, the at least one DDM protocol debug command from the debugger for debugging a particular application; transmitting, by the debug monitor over the respective JDWP connection, the second request packet of JDWP data including the at least one debug command from the debugger for debugging a particular application, to the virtual machine on which the particular application is loaded; receiving, by the debug monitor and in response to the second request, a second reply packet of JDWP data including, in an unreserved bits section of the second reply packet, DDM protocol results from the virtual machine for executing the at least one debug command; transmitting, by the debug monitor, the DDM protocol results from the virtual machine to the debugger; and providing a representation of at least a portion of the current state information of the at least one virtual machine for display to a user, the portion of the current state information including the at least one state variable. |