当我在控制台中启动phonegap发布后,在我的Android手机中启动phonegap开发者时,我没有任何日志:
sudo phonegap serve
add to body class: platform-android
add to body class: platform-browser
[phonegap] starting app server...
[phonegap] listening on 192.168.1.81:3000
[phonegap]
[phonegap] ctrl-c to stop the server
[phonegap]
add to body class: platform-android
add to body class: platform-browser
[phonegap] 200 /__api__/appzip
但是,如果我在浏览器中启动网址http://192.168.1.81:3000,则会显示日志:
sudo phonegap serve
add to body class: platform-android
add to body class: platform-browser
[phonegap] starting app server...
[phonegap] listening on 192.168.1.81:3000
[phonegap]
[phonegap] ctrl-c to stop the server
[phonegap]
add to body class: platform-android
add to body class: platform-browser
[phonegap] 200 /__api__/appzip
[phonegap] 200 /
[phonegap] 200 /css/ionic.app.css
[phonegap] 200 /lib/ionic/js/ionic.bundle.js
[phonegap] 200 /lib/ngstorage/ngStorage.min.js
[phonegap] 200 /lib/angular-translate/angular-translate.min.js
[phonegap] 200 /cordova.js
[phonegap] 200 /lib/angular-mocks/angular-mocks.js
[phonegap] 200 /lib/ngCordova/dist/ng-cordova.js
...
[phonegap] [console.log] clean
[phonegap] 200 /socket.io/?EIO=3&transport=polling&t=LN-GM2D&sid=1xRGqxTcx7-1oUGkAAAA
[phonegap] 200 /socket.io/?EIO=3&transport=polling&t=LN-GM2H&sid=1xRGqxTcx7-1oUGkAAAA
[phonegap] [console.log] Init accountcontroller
[phonegap] 200 /socket.io/?EIO=3&transport=polling&t=LN-GM4W&sid=1xRGqxTcx7-1oUGkAAAA
[phonegap] [console.log] Enter accountcontroller
如何从正在运行的phonegap开发者应用中获取日志?
请注意,我已经安装了插件cordova-plugin-console。