官术网_书友最值得收藏!

Dalvik Debug Monitor Server

The Dalvik Debug Monitor Server (DDMS), whether it's accessed through the standalone application or the Eclipse perspective with the same name, provides handy features for inspecting, debugging, and interacting with emulator and device instances. You can use DDMS to inspect running processes and threads, explore the filesystem, gather heap and other memory information, attach debuggers, and even take screenshots. For emulators, you can also simulate mock location data, send SMS messages, and initiate incoming phone calls:

As the preceding screenshot shows, DDMS can primarily track, update, and display the following information:

  • All running processes
  • All running threads per process
  • Consumed heap per process
  • All log messages

On Android, every application runs in its own process, each of which runs in its own virtual machine. The debugger can be attached to the exposed port of VM. DDMS connects to adb on start. On successful connection, a VM monitoring service is created between adb and DDMS, which informs DDMS upon starting and ending a VM on the device. DDMS retrieves the VM's process ID via adb, and opens a connection to the VM's debugger when there is an active VM running through the adb daemon on the device. DDMS can now communicate to the VM using a custom wire protocol.

DDMS also listens on the default debugging port, called base port. The base port is a port forwarder, which can accept VM traffic from any debugging port and forward it to the debugger. The traffic that is forwarded is determined by the currently selected process in the DDMS Devices view.

主站蜘蛛池模板: 澄城县| 昌图县| 壶关县| 定州市| 古蔺县| 安仁县| 特克斯县| 通山县| 靖州| 壤塘县| 潞城市| 利津县| 黎川县| 兴宁市| 韩城市| 贵州省| 大姚县| 偏关县| 桐梓县| 盐边县| 呼图壁县| 永登县| 军事| 盐山县| 平遥县| 镇宁| 康乐县| 贵德县| 广州市| 泰安市| 宁德市| 二连浩特市| 凤城市| 来安县| 东乌| 昭苏县| 盐津县| 禹城市| 丹巴县| 峨山| 通化市|