Ping命令
等Device Emulator启动之后,我们可以在输入命令进行调试了。在Target目录中选Target Control,Command Shell会出现。下图所示:
先运行ping命令,如果我们直接输入s ping x.x.x.x的话,会在模拟器中显示一个命令行窗口,并且输出执行结果。S的意思是在CE中运行某个应用程序。结果如下图:
不过问题随之而来,命令行窗口会在ping命令执行完成后,自动退出。我们想查看ping命令的执行情况,就需要眼疾手快了。难道,没有其他的办法了吗?
有,我们输入s ping x.x.x.x /d,执行结果会输出到output窗口中。
下面的演示我会将output里的结果贴出来,不再截图了。
ipconfig命令
接下来是另外一个简单的网络监测工具:ipconfig。在Command Shell中输入s ipconfig /all /d。/all 是ipconfig的命令,显示所有的配置信息,除此之外还有/renew和/release两个参数,用于更新网卡的IP地址。/d还是将结果显示到 Output窗口中。
PB Debugger Loaded symbols for 'D:\NINMA\RELDIR\DEVICEEMULATOR_ARMV4I_RELEASE\IPCONFIG.EXE'
122396 PID:5860042 TID:5890056 Windows IP configuration
122465 PID:5860042 TID:5890056 Ethernet adapter Local Area Connection:
122465 PID:5860042 TID:5890056 IP Address ........ : 192.168.0.163
122465 PID:5860042 TID:5890056 Subnet Mask ....... : 255.255.255.0
122465 PID:5860042 TID:5890056 IP Address ........ : fe80::203:ffff:fe55:8d9f%5
122465 PID:5860042 TID:5890056 Default Gateway ... : 192.168.0.1
122465 PID:5860042 TID:5890056 Adapter Name ...... : NE20001
122465 PID:5860042 TID:5890056 Description ....... : NE20001
122465 PID:5860042 TID:5890056 Adapter Index ..... : 2
122465 PID:5860042 TID:5890056 Address............ : 00 03 ff 55 8d 9f
122465 PID:5860042 TID:5890056 DHCP Enabled....... : YES
122465 PID:5860042 TID:5890056 DHCP Server........ : 192.168.0.1
122465 PID:5860042 TID:5890056 Primary WinsServer :
122465 PID:5860042 TID:5890056 Secondary WinsServer:
122465 PID:5860042 TID:5890056 Lease obtained on : Sunday, July 5 ,2009 18 : 5 : 30
122465 PID:5860042 TID:5890056 Lease expires on : Sunday, July 12 ,2009 18 : 5 : 30
122465 PID:5860042 TID:5890056 AutoConfig Enabled : YES
122465 PID:5860042 TID:5890056
122465 PID:5860042 TID:5890056 Tunnel adapter []:
122467 PID:5860042 TID:5890056 Interface Number .. : 4
122467 PID:5860042 TID:5890056
122468 PID:5860042 TID:5890056 Tunnel adapter [6to4 Pseudo-Interface]:
122468 PID:5860042 TID:5890056 Interface Number .. : 3
122468 PID:5860042 TID:5890056
122469 PID:5860042 TID:5890056 Tunnel adapter [Automatic Tunneling Pseudo-Interface]:
122469 PID:5860042 TID:5890056 Interface Number .. : 2
122470 PID:5860042 TID:5890056 IP Address ........ : fe80::5efe:192.168.0.163%2
122470 PID:5860042 TID:5890056
122474 PID:5860042 TID:5890056 Host name.......... : WindowsCE
122474 PID:5860042 TID:5890056 Domain Name........ :
122474 PID:5860042 TID:5890056 DNS Servers........ : 62.244.19.19
122474 PID:5860042 TID:5890056 192.168.0.1
122474 PID:5860042 TID:5890056 NODETYPE........... : 8
122474 PID:5860042 TID:5890056 Routing Enabled.... : NO
122474 PID:5860042 TID:5890056 Proxy Enabled...... : NO
122474 PID:5860042 TID:5890056
PB Debugger Unloaded symbols for 'D:\NINMA\RELDIR\DEVICEEMULATOR_ARMV4I_RELEASE\IPCONFIG.EXE'
【编辑推荐】