How to watch console.logs in ionic emulator?

前端 未结 6 1010
别那么骄傲
别那么骄傲 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:49

    run ionic emulate ios -l -c

    This will open the emulator with livereload feature, and you'll see all the console logs in the terminal. To turn the console logs off (or on) just write consolelogs or just c in the terminal while the ionic server is running

    Another very convenient way to debug your app when using iOS emulator/device is using the Safari developer tools

    When the app runs - enter Safari and choose "Develop > iOS Simulator > your page"

    If you work with a real device you'll see the device's name instead of "iOS Simulator"

    If you don't see the "Develop" menu in safari - enter Safari's preferences and enable it from the "advanced" tab

提交回复
热议问题