How to watch console.logs in ionic emulator?

前端 未结 6 1070
别那么骄傲
别那么骄傲 2021-02-01 14:33

I\'m building an app using the Ionic framework, which I\'ve done in the browser until now. Because I now want to use the cordovaOauth plugin I need to use the emulator. The prob

6条回答
  •  轮回少年
    2021-02-01 14:41

    Just enable the console logs in the emulator. Here my example:

    > ionic emulate ios --livereload
    
      Setup Live Reload
      Running dev server: http://localhost:8100
      Adding in default Ionic hooks
      Running live reload server: http://localhost:35729
      Watching : [ 'www/**/*', '!www/lib/**/*' ]
      Ionic server commands, enter:
        restart or r to restart the client app from the root
        goto or g and a url to have the app navigate to the given url
        consolelogs or c to enable/disable console log output
        serverlogs or s to enable/disable server log output
        quit or q to shutdown the server and exit
    

    Type consolelogs in the command line and hit enter.

      consolelogs
    
      Console log output: enabled
      Loading: /?restart=382451
      ionic $ 0     498458   log      Hi there! This is from console.log
    

提交回复
热议问题